Layout change depending on page type

Topics: Customizing Orchard, Writing themes
Nov 16, 2011 at 10:01 PM

Hi guys,

I have a theme that I have created, however I have hit a bit of a dead end, hopefully you can help.

For pages that are not lists, I need to wrap the content in an extra div tag. For pages that are lists, the content shouldn't be wrapped in this div.

Is there a way for me to change the html around content depending on the page type?

 

Thanks!

Coordinator
Nov 16, 2011 at 10:13 PM

You could have a list.wrapper.cshtml in your theme that adds the div around the lists.

Nov 16, 2011 at 10:23 PM

Sorry, I need the div to be around pages that are not lists.

Coordinator
Nov 16, 2011 at 10:28 PM

Override the template for pages then?

Nov 16, 2011 at 10:49 PM

Worked perfectly, thanks!