Custom layout for different pages?

Topics: Writing themes
Aug 25, 2014 at 9:32 PM
Edited Aug 26, 2014 at 10:22 AM

I cannot figure out how to have different layout for my homepage and subpages. I have that I should rename Layout to something like Layout-HomePage.cshtml but that does not work.

I created theme from scratch (not based on any other theme) and my friend created simple HTML/CSS layout to structure homepage. I have my homepage already set up with zones and content but when I navigate to subpages it displays my homepage layout.

I am using newest version of Orchard.

Thanks for any help or pointing me into right direction :)
Aug 26, 2014 at 4:05 AM
Make sure that you enabled the URL Alternates feature and that your file is named as "Layout-url-homepage.cshtml". That will work.
Aug 26, 2014 at 10:22 AM
Thanks, that did the trick and now it works.