I'm new to Umbraco and using Umbraco 6 RC.I have created a master templage with name/alias "ExampleHome" and a child template but when I publish it only display the contents of master page.
In my sample site I have followed the syntax defined in videos, also installed the package to get idea but it doesn't seem to work.
No, it doesn't display the hardcoded text as well.
But when I add text in master template under content place holder of child template then it display the text (Hello world from Master page!) but doesn't display the child template's text.
Niamh, are you still having problems with this? Does not look like anything is wrong with the ASP markup. I would suggest putting sometext in the child templates under:
Master Page issue
Hi
I'm new to Umbraco and using Umbraco 6 RC.I have created a master templage with name/alias "ExampleHome" and a child template but when I publish it only display the contents of master page.
In my sample site I have followed the syntax defined in videos, also installed the package to get idea but it doesn't seem to work.
Master template
------------------------------------------------------------------
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<!DOCTYPE HTML>
<html lang="en">
<head>
<title><umbraco:Item field="pageTitle" useIfEmpty="pageName" runat="server"></umbraco:Item></title>
<link rel="stylesheet" type="text/css" href="/css/screen.css" media="all" />
</head>
<body>
<div>
<umbraco:Item field="logo" runat="server" />
</div>
<div>
<asp:ContentPlaceHolder Id="childContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</body>
</html>
</asp:Content>
------------------------------------------------------------------
Child template
------------------------------------------------------------------
<%@ Master Language="C#" MasterPageFile="~/masterpages/ExampleHome.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderId="childContent" runat="server">
<umbraco:Item field="services" runat="server" />
</asp:Content>
------------------------------------------------------------------
---------------------------------------------------
When I publish it should display logo as well as service section contents but it only display logo as shown below.
Am I missing anything ?
Hi Niamh and welcome to our :)
What happens if you enter some hardcoded text in your child template? Does that get displayed?
/Jan
Hi Jan,
Thanks for the response,
No, it doesn't display the hardcoded text as well.
But when I add text in master template under content place holder of child template then it display the text (Hello world from Master page!) but doesn't display the child template's text.
Master template
--------------------------------------
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<!DOCTYPE HTML>
<html lang="en">
<head>
<title><umbraco:Item field="pageTitle" useIfEmpty="pageName" runat="server"></umbraco:Item></title>
<link rel="stylesheet" type="text/css" href="/css/screen.css" media="all" />
</head>
<body>
<div>
<umbraco:Item field="logo" runat="server" />
</div>
<div>
<asp:ContentPlaceHolder Id="childContent" runat="server">
</asp:ContentPlaceHolder>
<p>Hello world from Master template!</p>
</div>
</body>
</html>
</asp:Content>
-----------------------------------------------
Child template
---------------------------------------------
<%@ Master Language="C#" MasterPageFile="~/masterpages/ExampleHome.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderId="childContent" runat="server">
<p>Hello world from child template!</p>
</asp:Content>
------------------------------------------
Niamh, are you still having problems with this? Does not look like anything is wrong with the ASP markup. I would suggest putting sometext in the child templates under:
<asp:Content ContentPlaceHolderId="childContent"...>
</asp:Content>
Otherwise you wont see anything. Charlie :).
I think the problem was that you had no information with in the <umbraco:Item field="services" runat="server" /> for whatever reason.
is working on a reply...