Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1431 posts 3332 karma points c-trib
    Dec 06, 2010 @ 11:15
    Simon Dingley
    0

    Umbraco Item useIfEmpty - Node Attribute?

    Is there any way to provide a fallback value using the useIfEmpty attribute and supplying a node attribute such as nodeName? I want to do something like this but having no joy:

    <umbraco:Item ID="Item1" runat="server" Field="pageHeader" useifempty="nodeName" />
  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Dec 06, 2010 @ 11:52
    Lee Kelleher
    1

    Hi Simon,

    I think the attribute is case-sensitive... try "useIfEmpty"?

    Cheers, Lee.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 06, 2010 @ 11:58
    Kim Andersen
    1

    Hi Simon.

    If you want to show the node name in this situation you shall probably use the pageName like this:

    <umbraco:Item ID="Item1" runat="server" Field="pageHeader" useIfEmpty="pageName " />

    and yeah, like Lee says, I think that the attribute is case sensitive as well :)

    /Kim A

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Dec 06, 2010 @ 12:04
    Simon Dingley
    0

    Perfect thanks guys.

  • 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