Copied to clipboard

Flag this post as spam?

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


  • Nam Gi VU 26 posts 47 karma points
    Jan 14, 2010 @ 17:09
    Nam Gi VU
    0

    The differences between the nibble.de 's tutorial and the Umbraco V4 's template

    Today I read one Niels Hartvig's turtor here http://umbraco.org/blog/2007/12/12/dec-8-adding-page-information-to-templates but when creating a new template in Umbraco V4 I see that it has the predefined text as belowing other than blank text as mentioned in the tutor.

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

        <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
     
        </asp:Content>

    Please tell me why there's such difference.

     

    Nam.

  • Timsn 121 posts 231 karma points
    Jan 14, 2010 @ 17:14
    Timsn
    0

    This is because umbraco v4 introduces the use of asp.net masterpages. The blogpost looks like umbraco v3 was used.

    You can read more about the masterpages in this wiki entry

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 14, 2010 @ 21:22
    Douglas Robar
    0

    Timsn is absolutely correct... the old tutorial is from 2007 and an earlier version of umbraco. Umbraco 4 uses standard asp.net masterpages so a quick search on the internet should find a lot of help about the <asp:ContentPlaceHolder> and <asp:Content> tags, for instance.

    The wiki entry is helpful as well.

    You might also find the Runway or CWS starter websites helpful as a way of seeing working examples.

    cheers,
    doug.

  • Nam Gi VU 26 posts 47 karma points
    Jan 15, 2010 @ 03:39
    Nam Gi VU
    0

    Thanks Tim & Douglas!

    In that case, I understand that Umbraco V4 use .Net 's MasterPage. My next question is "Why does a newly created template need to inherit from an umbraco's default masterpage?"

    Nam.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 15, 2010 @ 11:38
    Douglas Robar
    0

    Umbraco's default masterpage is the one that umbraco already knows about and uses to render your output. By using umbraco's default masterpage as the master you can create your templates using any name you like without having to make any other changes to umbraco or your site.

    ...it's a lot easier to use it than it is to describe it.

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft