Sitefinity and cascading masterpages
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
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
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">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
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
>
<%@ 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">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
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
>
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