Sitefinity and cascading masterpages

Posted by Community Admin on 03-Aug-2018 07:33

Sitefinity and cascading masterpages

All Replies

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

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

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

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

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

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.
 

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

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

This thread is closed