Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Multiple master pages View modes: 
User avatar
Member
Member
kentico-globi - 3/30/2011 11:17:46 AM
   
Multiple master pages
I'm trying to create multiple master pages that will be used in different sections of the site. I see that I can check "Master template" for a Page Template and that is supposed to make it a master page, but then how do I get a different template to use that master template?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/30/2011 4:00:53 PM
   
RE:Multiple master pages
Hi,

You can have only one master page assigned to the root document. However, you can use the Visual inheritance where you can set the inheritance level for given site section and have different look and feel and also add another page placeholder web part so it will be like another master page. I hope it makes sense.

Best regards,
Juraj Ondrus

User avatar
Member
Member
DesignByOnyx - 4/8/2011 5:51:08 PM
   
RE:Multiple master pages
It would be nice if by checking the "Master Page" option in the Template Properties allowed for that template to behave like the root master page (with a "Master Page" tab) so we can edit the HEAD and BODY tags, etc.

User avatar
Member
Member
DesignByOnyx - 4/8/2011 6:29:07 PM
   
RE:Multiple master pages
Well, something changed between my last comment and now... and I can now see the "Master Page" tab where it wasn't showing up earlier. Don't know what happened, but please disregard my previous comment. This is my first project using master pages for separate sections of this site.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/10/2011 8:42:35 PM
   
RE:Multiple master pages
Hi,

Refresh of the "edit" area is necessary after you have changed the page template for given document.

For other documents you can use the "Head HTML" web part where you can add the HTML code for header tag for given document (or documents which are using the page template with the web part).

Best regards,
Juraj Ondrus

User avatar
Member
Member
lancetek - 8/23/2011 4:30:12 PM
   
RE:Multiple master pages
I'm trying to do the mock multi master page thing too. I tried the 'visual inheritance' trick, but that only seems to work for *web parts* on the root masterpage... any entry in the 'header' of the root master still gets given to all of the child pages... is this by design?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/24/2011 2:48:24 AM
   
RE:Multiple master pages
Hi,

Could you please describe your setup with more details? I tried this and it is working just fine:

root (page template marked as master template)
---Page1 (whatever template, header inherited from root)
---Page2 (another page template marked as master template, Master page tab available)
------Page21 (some page template, header inherited from Page2 and not from root)
etc.


Best regards,
Juraj Ondrus

User avatar
Member
Member
lancetek - 8/24/2011 5:47:44 AM
   
RE:Multiple master pages
I've got a similar setup:

Root masterpage
-- Mobile masterpage
-- -- mobile home (trying to inherit from Mobile masterpage)


The inheritance thing worked fine for the webparts - on 'mobile home' I only see the web parts from the mobile masterpage. But the header info from the Root masterpage ( containing calls to .js and .css) still comes through on the 'mobile home' page!

So I end up having a bunch of .css and .js files I don't want in any subpages of the Mobile masterpage.

I've got a workaround using a Html Head control on the Root masterpage, but that feels a bit 'hacky'.

I'm using v5.5.4191R2

Lance

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/24/2011 6:42:42 AM
   
RE:Multiple master pages
Hi,

What page template is assigned to the mobile master? Is this template marked as master page template as I mentioned in my previous post?

I tried it and I am not getting any header content from the main root in the page under the second master page.

Best regards,
Juraj Ondrus

User avatar
Member
Member
lancetek - 8/24/2011 7:10:38 AM
   
RE:Multiple master pages
The mobile master IS a masterpage. The extra .js and .css from the header of the Root masterpage are appearing in the children of the mobile master. They don't appear in the mobile master, but in pages underneath the mobile master.

Here's an example:
The Root Master has a header field. In this header field is:

<script type="text/javascript" src="/Style/includes/js/jquery.validate.js"></script>


This does NOT appear in the <header> of the mobile master. It DOES appear in the <header> of the 'mobile home' page, which is configured to only inherit content from the mobile master.

I've tried all the settings under 'Inherit Content' on the Mobile Home page:
- Do not inherit any content - STILL inherits the header content from the Root Master, but does NOT inherit any of the web parts
- Inherit only master page - Inherits from the Mobile Master AND header stuff from the Root master
- Select inherited levels - Ticking only the 'mobile master' box - Inherits from the Mobile Master AND header stuff from the Root master

If you have teamviewer you are welcome to view my screen to see these shenanigans! Skype me on lanceomagnifico or send me an email.

Lance



User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/25/2011 2:11:48 AM
   
RE:Multiple master pages
Hi,

I am using 5.5R2 version with latest hotfix and it is working just fine. Maybe I am missing something too.

Could you please send us site export package to support@kentico.com so we can check your settings and reproduce it?

Best regards,
Juraj Ondrus

User avatar
Member
Member
lancetek - 8/26/2011 6:52:48 AM
   
RE:Multiple master pages
Just to keep this thread updated...

I exported my site and sent it to Kentico... and they couldn't replicate the problem.

But I did find a trick to fix it; I found that if I put content in the header of the Mobile masterpage, that forced the Mobile/Home page to take the header content from the Mobile masterpage and NOT from the Root masterpage. And then I deleted the header content from the Mobile masterpage (so the header fields were empty), and the Mobile/Home page kept inheriting the Mobile masterpage header and didn't revert back to inheriting from the Root masterpage.