Temporarily change a Sitecore item's layout

后端 未结 4 1026
小蘑菇
小蘑菇 2021-01-25 10:58

Using this code I managed to change the renderings on the current item. However this changed it permenantly in Sitecore (the changes were could be seen in the CMS) and not tempo

4条回答
  •  情话喂你
    2021-01-25 11:30

    Rather than change sitecore presentation, can you not place the 'form' control and sidebar within one parent control container? You would then have an an easy id for a sidebar container with which to conditionally populate controls programatically from the form control.

    Alternatively, could you add all the possible controls to the sidebar and 'activate' (or perhaps just make visible) the required control(s), maybe via session state variables? (I dont know if this falls foul of some lifecycle or timing limitiation)

提交回复
热议问题