Copied to clipboard

Flag this post as spam?

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


  • Stephen 204 posts 246 karma points
    Oct 05, 2011 @ 17:39
    Stephen
    0

    Default Page Title's

    I have a master template which handles the page title like this

    <title>
    <asp:placeholder runat="server"><umbraco:Item field="umbracoUrlAlias" runat="server"></umbraco:Item> / <umbraco:Item runat="server" field="siteName" recursive="true" /></asp:placeholder>
    </title>

    Is there a way so that if the user has not entered anything in the umbracoUrlAlias for a page they have created that it defaults to a defined set of text?


    Chees,

    S

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Oct 05, 2011 @ 17:44
    Lee Kelleher
    1

    Hi Stephen,

    There is an attribute called "textIfEmpty" which will do what you want:

    <umbraco:Item field="umbracoUrlAlias" textIfEmpty="default text" runat="server" />

    Cheers, Lee.

  • Stephen 204 posts 246 karma points
    Oct 05, 2011 @ 17:47
    Stephen
    0

    Lee you a star! Mucho gracias.

    Stephen

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Oct 05, 2011 @ 17:57
    Lee Kelleher
    0

    De nada.

  • 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