Using many layout for module

Topics: Writing themes
Apr 13, 2012 at 4:17 AM

Hi,

I have created a module and added some routes to display content view in another urls.

Currently, every content view use actived orchard theme which is generated in file Layout.cshtml.

But I want to apply many layout for these content views.

Can Orchard framework implement that?

Please give me some advices.

Thanks,

Hien Phan

Coordinator
Apr 13, 2012 at 4:41 AM

Of course. You could add alternates to the Layout shape from your controller code.

Apr 13, 2012 at 5:18 AM
bertrandleroy wrote:

Of course. You could add alternates to the Layout shape from your controller code.

Hi bertrandleroy,

Can you give me more explanation about that?

Thanks,

Coordinator
Apr 13, 2012 at 5:28 AM

http://docs.orchardproject.net/Documentation/Alternates

http://weblogs.asp.net/bleroy/archive/2010/12/14/switching-the-layout-in-orchard-cms.aspx

Apr 13, 2012 at 10:10 AM
bertrandleroy wrote:

http://docs.orchardproject.net/Documentation/Alternates

http://weblogs.asp.net/bleroy/archive/2010/12/14/switching-the-layout-in-orchard-cms.aspx

Thanks!