Questions tagged [renderfield]
For questions specifically related to Sitecore's renderField pipeline.
24
questions
1
vote
0
answers
38
views
Sitecore DropTree field render in JSS layout service API
I am using DropTree field and I selected the listing page Item. so now I want to see the selected item full path in the layout service API.
Actually Layout Data
"componentName": "...
1
vote
2
answers
53
views
How to get Sitecore Updated Field only?
I want to send only updated fields for Translation.
How can I know which fields have been updated on an item?
0
votes
1
answer
127
views
Javascript link rendered without onclick attribute in preview
When using javascript link the edit mode renders the target script in onClick attribute
<a href="#" onclick="javascript:void(0);onclick=javascript:openOverlay('test-overlay',event);...
2
votes
1
answer
144
views
Custom field type has empty string for FieldTypeKey in RenderPipelineArgs; how to populate?
I'm creating a custom field type for our responsive image implementation in Sitecore 10.1 and I need a way to display the image using Html.Sitecore().Field("field_name"). I think I'm mostly ...
1
vote
0
answers
48
views
Set General Link Internal Path Globally
Has anyone set the start path of the General Link field globally when choosing internal? I can do it per item/template, but looks like it requires custom code to have it applied globally. I thought ...
0
votes
0
answers
137
views
Render anchor tag with content in web form and Experience Editor
I am looking to Render a General Link Field in Sitecore 8.2 with Webforms. I also have the content inside the anchor <a> tag which needs to content editable in Experience Editor. Also, I want ...
3
votes
4
answers
4k
views
How to render a Link Field with inner elements in .cshtml
As we know, we can use this to render General Link fields in our views:
@Html.Sitecore().Field("Field Name", sourceItem)`
This will generate the usual output:
<a attribute="" another-attribute="...
0
votes
1
answer
2k
views
RenderingContext is null
I want to access the rendering context in the getLookupSourceItems pipeline.
public void Process(GetLookupSourceItemsArgs args)
{
//
var rc = Sitecore.Mvc.Presentation.RenderingContext....
0
votes
1
answer
455
views
Retrieving item from Droplink Rendering Parameter
How can I get the referenced item from a droplink field in rendering parameters.
What I tried:
var model = new DFFVideoModel();
LookupField VideoItem = (LookupField)RenderingContext.Current....
2
votes
1
answer
325
views
Date in rendering variants
I used template containing field from type DateTime and render time in Rendering Variant like that
When I enter date only in field and time is empty, it render default value 12:00 AM so I need to ...
1
vote
0
answers
659
views
Custom parameters in media URL query string - Sitecore render method/pipeline
I am using Sitecore's render method to construct the query strings for image assets, but I have a small challenge parsing custom parameters into the rendered query string in the HTML.
It seems that ...
0
votes
1
answer
785
views
Glass RenderLink not rendering right media url
Sitecore verison - 9.0.2
Glass version - 5.0.6.0
We are trying to use Glass @RenderLink to render a pdf media item, it's generating anchor tag with below path
/sitecore/media-library/site-content/...
0
votes
1
answer
2k
views
FieldRenderer.Render for controller Rendering not "working"
I am trying to create a controller Rendering with the use of FieldRenderer.Render, but this does not work.
The Controller
public ActionResult PageImage()
{
return View(PageImageModelBuilder....
3
votes
1
answer
331
views
Computed Index field as a rendering variant
How can I insert a computed index field in Solr as a rendering variant, I tried creating a field variant with the same name but it didn't work.
1
vote
1
answer
640
views
How to get first child of an item in content tree?
I am trying to get only one item under a specific page in the content tree using a query in variant. I tried query:.//* but it gets all children under that item. I only need the first one. Any ideas?
3
votes
2
answers
848
views
Image not rendering in SXA PageList variant
I need to create an image grid, like this (image and title) using Sitecore's SXA 1.6.
I took the approach of using a Page list component to implement this and gave it a media folder as a data source. ...
1
vote
1
answer
1k
views
Rendering a Sitecore field in MVC with an enclosing tag and class
We effectively have an item with three fields.
Text to display in a heading.
Droplink with the type of heading to display the text in (h1, h2, ...).
Droplink with the heading style that points to the ...
1
vote
1
answer
718
views
How to pass data between renderings in sitecore 9.0.1?
For passing data between renderings I have seen this blog. Here they use below method to set data:
ContextService.Get().GetCurrent().ViewData.Add("_SharedModel", viewModel);
In Sitecore 9.0.1 I ...
0
votes
2
answers
830
views
Make a field(RTE) disable(readonly) and enable(editable) on toggle of checkbox in Content Editor
I am trying to disable(readonly) and enable a RTE field on toggle of a checkbox in the Content Editor.
The John west blogs tells
to alter the "renderContentEditor" Pipeline which I guess will not be ...
2
votes
1
answer
907
views
FieldRenderer not rendering an image
I am trying to render an Image in Sitecore 7.2
I am using following markup but it is showing text only, images is not being displayed.
<div class="advisor-advertisement">
some text here
...
3
votes
2
answers
2k
views
Making field of type 'File' editable in Experience Editor with Glass Mapper
I am trying to make a file field editable in the Experience Editor. But neither @Html.Glass.Editable(field, f => f.File) nor the usage of an @Html.BeginEditFrame works. Is there a way with Glass ...
0
votes
1
answer
55
views
Partial LinkField for Sitecore 8.1 rev. 160302
My issue is that I need to be able to allow a user to use the General Link FieldType and when the field is rendered I only want part of the text to be linkable.
Example:
Link Description: This is my ...
3
votes
1
answer
793
views
Cascading Droplist field in Sitecore
I have item in sitecore which contains a field country and region.
Now when I select the country I need to load the related region like cascading dropdown.
Is there any possiblity of creating custom ...
7
votes
1
answer
1k
views
Adding Attributes to Rendered Link Programmatically
We need to apply attributes to rendered links conditionally. For example, if an internal link points to a specific template, add an attribute to the rendered anchor tag. Our initial efforts have ...