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

Forums / General Discussions / Sitefinity and cascading masterpages

Sitefinity and cascading masterpages

4 posts, 0 answered
  1. F
    F avatar
    34 posts
    Registered:
    15 Mar 2011
    25 May 2011
    Link to this post
    Hello,

    for organizational and practical reasons, I would like to use cascading masterpages with sitefinity.
    So, I made a test involving 3 levels of masterpages, level 2 inheriting level 1 and level 3 inheriting level 2.
    Each inherited level using its parent's placeholder to put its own content and placeholder.

    I made a test and found the folowing problem :

    when I create a template based on a level 2 or 3 masterpage, the template not only displays the current masterpage placeholders (which is good), but also the containing placeholders from the parent (which is bad).

    Is it working as intended (as in Sitefinity allows only one level of masterpage by design), or is it a bug that could be fixed or worked around?

    Thank you,
    F
  2. Antoaneta
    Antoaneta avatar
    258 posts
    Registered:
    02 Nov 2015
    27 May 2011
    Link to this post
    Hi F,

    Thank you for contacting us.

    To be sure we understand your problem correctly and without any doubts I would appreciate if you could send us some more details, for example screenshots, video or the exact steps needed to reproduce the described behavior.

    Thanks for your cooperation in advance. 

    Kind regards,
    Antoaneta
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. F
    F avatar
    34 posts
    Registered:
    15 Mar 2011
    30 May 2011
    Link to this post
    Thank you,

    here is a test you can do to understand my problem.

    1 - In a template folder, (for example : "~/App_Data/Sitefinity/WebsiteTemplates/MyTemplate/App_Master/") create a master page, "master1.master", with the following code :

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Master1.master.cs" Inherits="App_Master_Master1" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
             
            </asp:ContentPlaceHolder>
        </div>
        </form>
    </body>
    </html>

    2 - Create another masterpage, "Master2.master", which will inherit from "Master1" as follow :
    <%@ Master Language="C#"  MasterPageFile="~/App_Data/Sitefinity/WebsiteTemplates/MyTemplate/App_Master/Master1.master" AutoEventWireup="true" CodeFile="Master2.master.cs" Inherits="App_Master_Master2" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
                <div id= "maincontent">
                    <asp:ContentPlaceHolder ID="MainContent" runat="server" />
                </div>
            </asp:Content>
        </form>
    </body>
    </html>

    3 - On Sitefinity, create a template based on "Master2".

    The way Master2 is made, I believe we should see only one placeholder (the one with the ID "MainContent") on the interface. But in my case, i see two.
    I believe Sitefinity displays both "MainContent", and the placeholder containning "MainContent" (the one with the ID "ContentPlaceHolder1".

    Am i right? And is it working as intended?

    Thank you,
    F.
     

  4. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    02 Jun 2011
    Link to this post
    Hello F,

    We created the tests as you described and at the moment this behavior is expected. There are many requests about this functionality and we are in serious discussion how this should work.

    Probably there will be an option that will provide functionality to allow or deny the use of the parent placeholder.

    All the best,
    Jordan
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered