SF 4.1 - Problems with nested Master pages

Posted by Community Admin on 05-Aug-2018 19:36

SF 4.1 - Problems with nested Master pages

All Replies

Posted by Community Admin on 26-Apr-2011 00:00

I have created a set of nested master pages in an attempt to reduce duplicate code in my layouts.

My "main.master" consists of one big area in the middle (a ContentPlaceHolder), and three ContentPlaceHolders across the bottom in my footer.  It also has a common header that is the same on every page of the site.

I have a secondary master page that uses "Main.master" as it's master page.  This one has two ContentPlaceHolders within the main ContentPlaceHolder.  This creates two columns within my secondary master page.  Because it is within main.master, though, my header will show on any page that uses this template, as well.


Now, all that being said, the problem this:
I created a page that uses "secondary.master" as its template.  This exposes the two ContentPlaceHolders from secondary.master, as well as the three footer ContentPlaceHolders that have been inherited from Main.Master.  When I put drop a control into one of the column placeholders, the content shows up perfectly and in the right place.  When I put a control into one of the footer placeholders, the content does not show up in the right place.  It shows up somewhere else within the secondary.master.

Since the drop zones showed up correctly in the admin from both secondary.master and main.master I figured this would be an acceptable design for my pages.  Is this not the case?  Is this a known bug?  Or is there a way to fix this?

Posted by Community Admin on 02-May-2011 00:00

Hi Chris,

Can you, please provide me with temporary login credentials to a site where I can inspect this behavior, since I'm not able to reproduce it locally. When using nested master pages the layout elements from the parent template will get loaded first and then the layout elements from the child template - this might be the case, so can you, please try putting another layout element in the inherited footer of the child template where you plan to place content on your page, and inform us if this fixes the issue.

All the best,
Boyan Barnev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Posted by Community Admin on 02-May-2011 00:00

I found my own workaround for this issue (I was able to hardcode the content/logic directly in the master page file instead of putting it in a control).  I likely won't have time this week to run through your test scenario, but if I remember next week I will post my results.

This thread is closed