Developer forum

Forum » CMS - Standard features » Changing the page template by the LayoutTemplate property of the PageView

Changing the page template by the LayoutTemplate property of the PageView

Ricardo Pereira
Ricardo Pereira
Reply

Hi,

I'm trying to change the page template by the LayoutTemplate property of the PageView:
Pageview.Page.LayoutTemplate = "MyPageTemplate.cshtml";

However, this is changing the template in the DW page and not just in the PageView context.
My question is, Can I change the page template just in the PageView context, just for that visualization, and not for all the users?

Thank you,
Ricardo


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

That is not possible. You can use the querystring parameter though: ?LayoutTemplate=SomeLayoutTemplate.cshtml

Votes for this answer: 1
 
Ricardo Pereira
Ricardo Pereira
Reply

Thank you, Nicolai.

 

You must be logged in to post in the forum