Skip to content

Instantly share code, notes, and snippets.

@parrya
Last active October 22, 2021 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parrya/fb2be518306306db5aff0b3b93296a0c to your computer and use it in GitHub Desktop.
Save parrya/fb2be518306306db5aff0b3b93296a0c to your computer and use it in GitHub Desktop.
Patch layout service renderJsonRendering
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<group groupName="layoutService">
<!-- NOTE: This patch will be have a slightly different signature in Headless Services for Sitecore 9.x vs 10. The below works for Headless Services in Sitecore 10 -->
<pipelines>
<renderJsonRendering>
<processor type="JSSDemo.Foundation.LayoutService.PipelineProcessors.CustomInitialize, JSSDemo.Foundation.LayoutService" resolve="true"
patch:instead="*[@type='Sitecore.LayoutService.Presentation.Pipelines.RenderJsonRendering.Initialize, Sitecore.LayoutService']"/>
</renderJsonRendering>
</pipelines>
</group>
</pipelines>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment