Copied to clipboard

Flag this post as spam?

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


  • madeinstein 5 posts 25 karma points
    Sep 25, 2009 @ 17:11
    madeinstein
    0

    Creative Website Starter - beginner question about child nodetypes

    Hi,

    I'm new to Umbraco and I'm doing evaluation now to decide if this is what I need for my work.

    I installed Umbraco with CWS and I'm trying to understand how it works and I have a question.

    Contact template has this entry

    <asp:Content ContentPlaceHolderId="SideBarContent" runat="server">
    </asp:Content>

    And I don't see how the content is being defined. I've noticed that Contact Document Type/Structure has Textpage marked as allowed child nodetypes and in the Textpage template it's being defined as below

    <asp:content ContentPlaceHolderId="SideBarContent" runat="server">
        <!-- XSLT Macro - Sub Navi -->
        <umbraco:Macro Alias="CWS_SubNavi" runat="server"></umbraco:Macro> 
    </asp:content>

    So really the question is how does the child nodetypes work? And what's the best way to define content for the template?

    Thanks

     

  • Timsn 121 posts 231 karma points
    Sep 25, 2009 @ 17:27
    Timsn
    0

    You can define one or more possible document types als child nodes for each document type. Means that you can define what documents can be created below another document.

    In your case you're able to create textpages below your contact page. You can create new pages in the content tree in umbraco backend (found in the content section).

    The template otherwise describes how your content is displayed. In your textpage template for example a marco is inserted in the sidebar placeholder, which will display a navigation for you.

    Here is a nice article about document types, this maybe helps understanding the structure a little better

    Hope it clears things a bit up.

  • Warren Buckley 2089 posts 4578 karma points MVP ∞ admin hq c-trib
    Sep 25, 2009 @ 17:39
    Warren Buckley
    0

    Hiya,
    Glad you took the time to download and install CWS - just so you are aware in the future CWS has its own dedicated forum here at our.umbraco.org
    http://our.umbraco.org/projects/creative-website-starter-%28cws%29 and if you have found the project useful I would appreciate it if you would give the project a thumbs up.

    Now with the shameless plug over, lets see if I can understand your questions and answer them:

    OK on the contact template we have an empty content placeholder tag as we dont want to insert any content/XHTML underenath the main naviagtion. If you put some XHTML in there and save the template and go back to the contact page you will see the update and where the HTML is being placed.

    The textpage has a refrence to a macro - which is an XSLT macro that lists child pages beneath that page.

    So the about page is a textpage and the pages beneath that are also a textpage so this allows us to see the child pages with this naviagtion XSLT script.

    As Tim mentions you can allow the document types you are allowed undereath a particular document type, in this case I wanted to allow the texpage document type underneath the contact document type as I wanted a textpage that contains a thank you message after the contact form was submitted.

    I hope this has made sense, but if you have any further questions please let me know.

    Thanks,
    Warren :)

  • madeinstein 5 posts 25 karma points
    Sep 25, 2009 @ 22:09
    madeinstein
    0

    Thanks that make sense now.

    I've missed the macro in the master template and I didn't realize there are two levels of navigation (CWS_Navi, CWS_SubNavi)

    Thanks for the article about document types, I've found few more useful articles so I'll paste them below as someone else might find them useful.

    I've also created quick installation guide on my blog if anyone is interested.

    I'll spend the weekend playing with umbraco and I'll see how it goes.

    Quick installation guide:

    http://itdevspace.blogspot.com/2009/09/umbraco-c-open-source-cms-installation.html

    Useful Articles:

    Document Types Explained
    http://umbraco.org/documentation/books/document-types-explained

    Templates Explained
    http://umbraco.org/documentation/books/templates-explained

    Understanding Templates & Stylesheets
    http://umbraco.org/documentation/books/understanding-templates--stylesheets

    Using .NET User Controls
    http://umbraco.org/media/42a0202c-b0ba-4f84-bcf1-64dfd5230322-usingcontrolswithumbraco.pdf
    http://umbraco.org/documentation/videos/for-developers/foundation/using-net-user-controls

    and of course the pdf which comes with CWS
    http://packages.umbraco.org/media/9318/cws_how_to_use.pdf

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies