Design and CSS styles
Version 7.x > Design and CSS styles > Master pages View modes: 
User avatar
Member
Member
pavel.1991-tut - 3/27/2013 4:49:16 AM
   
Master pages
I've done page template which contains header and footer. I appointed this template to the root document of content tree. Now all site pages have footer and header from this template. But now I have next task: there must be pages which have another footer and header. What should I do that some pages be with the other footer and header?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/27/2013 4:53:50 AM
   
RE:Master pages
Hello.

Is this portal engine master template, or physical .master page?

Do you want to change just content or some properties of web parts placed in your footer and header, or to apply different layout?

Thank you in advance for clarification.

Best Regards,
Radek Macalik

User avatar
Member
Member
pavel.1991-tut - 3/27/2013 5:28:06 AM
   
RE:Master pages
I do not know the difference between portal engine master template and physical .master page. I opened Site manager -> page templates and created page template with footer and header. I choosed "master page" checkbox in this template.

And now I want to apply the different layout(another master page) to some site pages. Another template(master page) with another footer and header.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/28/2013 5:09:13 AM
   
RE:Master pages
Hello.

According to the steps you described, it seems you are using standard Portal engine template.

By the way, you can find some comparison of ASPX templates and Portal engine dev model at http://devnet.kentico.com/docs/devguide/portal_templates_vs_aspx_templates.htm

Your goal is achievable using Visual inheritance functionality: http://devnet.kentico.com/docs/devguide/visual_inheritance.htm

Best Regards,
Radek Macalik

User avatar
Member
Member
pavel.1991-tut - 3/28/2013 7:31:21 AM
   
RE:Master pages
And how can it help me? I know about Visual inheritance. I will explane how I solved this problem and you will tell me it is right or not, ok?

I've done page template. I choosed master page checkbox in this template. I appointed this template to root document. All root document subpages are included in this template. Then I've done one more template. And I choosed master page checkbox in this template too. I've created root document subpage and named it "Master page2". Now if I want that some page use template from "Master page2" I do this new page subpage of "Master page2". And if I want some page use template from root document I do this new page subpage of root document. Is it right way?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/28/2013 8:17:14 AM
   
RE:Master pages
Hello.

Visual inheritance will help you as you can easily choose what level given page or sub-page should inherit from. Imagine this example:

root1
+ content 1
+ root 2
- content 2

The content 2 page can inherit from root 2 or root 1. It only depend on inheritance level. Are you familiar with this setting?

Best Regards,
Radek Macalik

User avatar
Member
Member
pavel.1991-tut - 3/28/2013 8:52:44 AM
   
RE:Master pages
1) Yes, I do exactly how you described. In this way document root 2 must be master page?
2) Using this method, link to content 2 has "root2" in its url. Url looks like this "mysite.com/root2/content2". But I do not need that "root2" be in url! Url must be like this "mysite.com/content2". How can I remove from url "root2" from root2 subpages?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/28/2013 9:13:44 AM
   
RE:Master pages
Hello.

It can be master page if you wish, or standard content page. Both is possible.

As for your second question, you could setup Custom URL path or document alias in the Properties / URLs section of the given document.

Best Regards,
Radek Macalik

User avatar
Member
Member
pavel.1991-tut - 3/28/2013 10:38:54 AM
   
RE:Master pages
"or document alias in the Properties / URLs section of the given document.". It means that I must add document alias to each page? Maybe there are another way?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/29/2013 4:23:43 AM
   
RE:Master pages
Hello.

You have basically three options.

1. Add custom url path or document alias to every page you want to apply it on.
2. Create given documents in respective part of the content tree, so the alias path is natural.
3. Use API and redirect requests in code.

Best Regards,
Radek Macalik