ASPX templates
Version 5.x > ASPX templates > Multiple mater pages View modes: 
User avatar
Member
Member
davef-helixpoint - 6/18/2010 8:59:36 AM
   
Multiple mater pages
I need to use different master pages for certain pages. Like the home page uses one master page and the contact us page uses a differnt Master page. Can this be done and how?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/21/2010 12:44:48 AM
   
RE:Multiple mater pages
Hello.

If you are using ASPX templates development model, then it can be easily done using master pages in your Visual Studio. You need to create new master page and use it with your Home content page. If you are using ASPX templates, this is the same procedure as on standard asp.net web site. You can find more info here: http://devnet.kentico.com/docs/devguide/using_the_master_pages.htm

Best Regards,
Radek Macalik

User avatar
Member
Member
lancetek - 5/17/2011 6:38:07 AM
   
RE:Multiple mater pages
How would you do it if you were using the 'Portal' development model?

User avatar
Member
Member
kentico_michal - 5/17/2011 8:22:05 AM
   
RE:Multiple mater pages
Hello,

Actually, there is one "Master page" tab for the root of the content tree. However, if you want to have different page layouts, you can use the ability of the Portal GUI to control inheritance of page templates and content. Detailed info can be found in our tutorial at:
- Visual inheritance
- Content tree and page templates

Using these tutorials, you can create following site structure (for example):

root
-> sectionA
-> -> subsectionA
-> sectionB
-> -> subsectionB

According to the tutorial, set 'Do not inherit any content' on the 'Properties ->Template tab' for each SectionA and B page (You can choose the way how to control visual inheritance according to your needs, e.g. no inheritance or inheriting from simple or blank root master page...). SectionA page will have layout different from sectionB page. Both pages will contain page placeholder. All subsections will be inheriting content from appropriate parent pages.

This way you can achieve 2 (or more) Master pages layout.

Best regards,
Michal Legen