question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RenderField pipeline only called in editing mode

See original GitHub issue

Hi Mike,

I have a Rich Text field on my page, where I add some additional markup for links in the renderField pipeline (e.g. adding always target_"blank" to some links). In my Razor view I added the field with an @Editable():

@Editable(m => m.Text)

This works as expected in editing mode, but not when I’m not in editing mode. In the GlassHtml class I saw, that the renderField pipeline in only called in editing mode (see here). Why don’t you call the pipeline when not in editing mode? Is there a solution/workaround I can still use the pipeline when I’m not in editing mode?

Thanks for looking into it and regards, Kevin

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
mikeedwards83commented, May 4, 2016

I think we added the field setting SitecoreFieldSettings.ForceRenderField which forces a string field to use the renderfield pipeline.

1reaction
cardinal252commented, Oct 17, 2018

Ok, so … What is the goal in manipulating the RenderField pipeline?

If it is to add markup (say for example) token processing to the output (which sounds like what you are doing) then you can simply either override GlassHtml or the field mapper to do the same thing whilst not losing the performance gain that avoiding the renderfield pipeline affords. Glass by design skips this pipeline to be faster, and in certain scenarios can actually render Sitecore content faster than Sitecore can. The choice between overriding GlassHtml and the field mapper largely depends on whether you would want the same replacements to be made in non-presentation scenarios - modifying GlassHtml would usually only modify output at a view level for like @Html.Glass().Editable()

The only time this generally causes a problem is if you are mixing glass and non-glass presentation (into which you may require explicitly calling the render field pipeline). Otherwise, you are simply modifying the wrong code to achieve what you need.

Hope this helps 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

RenderFields Pipeline does not show all Fields in Sitecore
GlasMapper does not run through the RenderField pipeline in Normal mode (it does in edit mode), this issue has been raised before as...
Read more >
- Sitecore RenderFiled custom pipeline is not executing in ...
Anyhow this code only works in experience mode , not in non-web editing mode , I mean when website will run from core...
Read more >
GetImageFieldValue in RenderField pipeline not able to hit
While extending Sitecore.Pipelines.RenderField.GetImageFieldValue not getting hit in my code. Even my component contains media field in it, any ...
Read more >
Creating fallback values using the RenderField pipeline
The pipeline ensures that fields can be used using Web Editing. The pipeline is used by the sc:FieldRenderer web control when you render...
Read more >
RenderField | Brian Pedersen's Sitecore and .NET Blog
The RenderField pipeline is the pipeline that Sitecore uses when rendering the value from the Sitecore database to the frontend. The pipeline ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found