Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James Feeney 26 posts 166 karma points
    Sep 03, 2013 @ 15:03
    James Feeney
    0

    Child template content not showing on Master template #confused!

    Hi all, I'm new to Umbraco v6.1.3, but I understand how templates work. I have an issue where content in my child templates do not appear in my master template.

    My Master Template

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    
    <asp:ContentPlaceHolder Id="Master" runat="server">
    </asp:ContentPlaceHolder>
    
    </asp:Content>
    

    My Child Template

    <%@ Master Language="C#" MasterPageFile="~/masterpages/default.master" AutoEventWireup="true" %>
    
    <asp:Content ContentPlaceHolderId="Master" runat="server">
    </asp:Content>
    

    I can populate the ContentPlaceHolder with content on the master and it shows fine.

    Master template drop-down for the master template is assigned to 'none'.

    Master template drop-down for the child template is assigned to 'Master'.

    Any ideas? Thanks in advance.

  • Charles Afford 1163 posts 1709 karma points
    Sep 04, 2013 @ 14:27
    Charles Afford
    0

    That looks fine how have you got your doc types and nodes setup?  Charlie :)

  • James Feeney 26 posts 166 karma points
    Sep 05, 2013 @ 12:06
    James Feeney
    0

    Hi Charlie,

    I double checked the doc types and nodes and everything seemed ok to me. I was playing about with it and now I'm getting this:

    Parser Error Message: The file '/masterpages/default.master' does not 
    exist.
    <%@ Master Language="C#" MasterPageFile="~/masterpages/default.Master" AutoEventWireup="true" %>

    I think there is a capital letter issue with my file names. What is the proper syntax for capitalisation for file names? 

    In my masterpages folder I have the file 'master'

    In Umbraco, Master Template has:
    Name: Master
    Alias: master
    Master Template: None
    Topline:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/default.master" AutoEventWireup="true" %>

    In Child Template:
    Name: Homepage
    Alias:  homepage
    Master Template: Master
    Topline:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/default.master" AutoEventWireup="true" %>

     

    Thanks

  • James Feeney 26 posts 166 karma points
    Sep 05, 2013 @ 12:25
    James Feeney
    100

    I found the problem. I changed the 'MasterPageFile' location in the top line of the master and every child template to this:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>

     I had default.master and not Master.master. No idea how that changed but child templates are now loading into master template :)

Please Sign in or register to post replies

Write your reply to:

Draft