Copied to clipboard

Flag this post as spam?

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


  • JacoboPolavieja 62 posts 84 karma points
    Jul 21, 2010 @ 22:02
    JacoboPolavieja
    0

    Can't inject content from slave template to master template

    Hello all,

     

    As easy as it sounds I don't know why I can't inject content on my master template.

     

    I have two templates: "thm_master" and "thm_news". On the "thm_master" I have the ContentPlaceHolder like this:

    <asp:ContentPlaceHolder Id="thm_masterContentPlaceHolder" runat="server">
      <!-- Insert default "thm_masterContentPlaceHolder" markup here -->
    </asp:ContentPlaceHolder>

     

    On the "thm_news" the code goes as:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/thm_master.master" AutoEventWireup="true" %>
      
    <asp:Content id="thm_newsContent" ContentPlaceHolderID="thm_masterContentPlaceHolder" runat="server">
      <div id="content" class="frontPage">
          <div>helloFromNews</div>
        <img src="../images/rss_icon.gif" />
      </div>
    </asp:Content>

     

    The "thm_master" doctype has "thm_news" as allowed child nodes also.

    I've watched the video from Umbraco.tv and the theory itself seems too easy, but I can't find what I'm doing wrong. Anyone with better eyes than me? ;).

     

    Thank you!

  • JacoboPolavieja 62 posts 84 karma points
    Jul 21, 2010 @ 22:08
    JacoboPolavieja
    0

    Nevermind... all the evening trying to sort this out and the moment I post the moment I realize I hadn't published the page... sorry, after hours in front of the screen these things happen...

     

    Thank you anyway and sorry again.

Please Sign in or register to post replies

Write your reply to:

Draft