+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / SF 4.1 - Problems with nested Master pages

SF 4.1 - Problems with nested Master pages

3 posts, 0 answered
  1. Chris
    Chris avatar
    21 posts
    Registered:
    16 Aug 2010
    26 Apr 2011
    Link to this post
    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?
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    19 Sep 2016
    02 May 2011
    Link to this post
    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 >>

  3. Chris
    Chris avatar
    21 posts
    Registered:
    16 Aug 2010
    02 May 2011
    Link to this post
    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.
3 posts, 0 answered