This project is read-only.

Layout change depending on page type

Topics: Customizing Orchard, Writing themes
Nov 16, 2011 at 11: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?



Nov 16, 2011 at 11:13 PM

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

Nov 16, 2011 at 11:23 PM

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

Nov 16, 2011 at 11:28 PM

Override the template for pages then?

Nov 16, 2011 at 11:49 PM

Worked perfectly, thanks!