TemplateDescriptor for page node children


I want to use a different controller for pages placed under a specific page node in the page tree when in edit-mode. For these pages I always want a controller that uses a view which has an IFrame in it that renders the normal look of the page in it. How can this be achieved?

I first though I'd make a DisplayChannel which checked the ID querystring and by that determine if it belongs under the page node and then use the TemplateDescriptor attribute on the controller to match the tag with the DisplayChannels name but the URL when in edit-mode looks like this: /epi/CMS/Content/pagenode/pagenode2,,349/?epieditmode=True which makes it hard to parse the ID in a nice way.

I'm guessing there must be a better way to do this. Should I use some other technique instead of DisplayChannels and TemplateDescriptor?

Apr 05, 2016 11:40

Found an answer: http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Rendering/Display-channels/Changing-display-channel-programmatically/

Apr 05, 2016 16:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.