RenderField pipeline only called in editing mode
See original GitHub issueHi 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:
- Created 9 years ago
- Comments:16 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we added the field setting SitecoreFieldSettings.ForceRenderField which forces a string field to use the renderfield pipeline.
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 😄