Questions tagged [renderfield]

For questions specifically related to Sitecore's renderField pipeline.

Filter by
Sorted by
Tagged with
1 vote
0 answers
39 views

sitecore link filed renderer to include atrribute from rte filed in anchor

I have one rte filed with some value like data-custom = '{test}'. I am using @Html.Sitecore().Field("LINK", Model.Item, new { @class = "testclass"})...
kuldeep's user avatar
  • 11
1 vote
1 answer
371 views

How to add custom data attribute on Sitecore general link fields

I would like to add a custom data attribute for each link filed in Sitecore. This custom attribute should be configurable for Content Authors. For Example <a href="#" class = "test&...
karan's user avatar
  • 11
0 votes
0 answers
36 views

JSON template in Sitecore 10.1

Is there any alternate to JSON template in Sitecore 10.1?. We migrated to Sitecore 10.1 from Sitecore 8. One of the Rendering Variants is JSONResults, which includes JSON Template inside JSONResults. ...
Owais Ahmed's user avatar
1 vote
0 answers
56 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": "...
Saiprasad's user avatar
1 vote
2 answers
81 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?
Gautam Aneja's user avatar
0 votes
1 answer
181 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);...
nari447's user avatar
  • 407
2 votes
1 answer
214 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 ...
Michael Smith's user avatar
1 vote
0 answers
60 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 ...
RReilley's user avatar
  • 755
0 votes
0 answers
154 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 ...
Arun Kumar's user avatar
3 votes
4 answers
5k 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="...
Marcel Gruber's user avatar
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....
user avatar
0 votes
1 answer
540 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....
Levi Wallach's user avatar
  • 1,085
2 votes
1 answer
366 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 ...
shimaa elsayed's user avatar
1 vote
0 answers
751 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 ...
Mark Wulff's user avatar
0 votes
1 answer
798 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/...
Dheeraj Palagiri's user avatar
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....
squadwuschel's user avatar
  • 1,165
3 votes
1 answer
352 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.
Mohamed Mosa's user avatar
1 vote
1 answer
722 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?
Basant A.'s user avatar
3 votes
2 answers
875 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. ...
Menah Alasmy's user avatar
1 vote
1 answer
2k 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 ...
James Skemp's user avatar
  • 1,398
1 vote
1 answer
734 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 ...
Anik Saha's user avatar
  • 475
0 votes
2 answers
876 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 ...
Amitabh's user avatar
  • 1,066
2 votes
1 answer
933 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 ...
Ali's user avatar
  • 391
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 ...
staccata's user avatar
  • 553
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 ...
doctorwho's user avatar
3 votes
1 answer
806 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 ...
keerthi's user avatar
  • 31
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 ...
jrap's user avatar
  • 4,931