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 1474 posts 3431 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 4026 posts 15836 karma points MVP 13x 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 1474 posts 3431 karma points c-trib
    Dec 06, 2010 @ 12:04
    Simon Dingley
    0

    Perfect thanks guys.

Please Sign in or register to post replies

Write your reply to:

Draft