Copied to clipboard

Flag this post as spam?

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


  • Lars Mortensen 90 posts 98 karma points
    Jul 10, 2010 @ 13:18
    Lars Mortensen
    0

    Recurse Properties

    Hi

    On my top node I have added a Property.
    This Property is now visible on all the sub nodes.
    But I don't want to write text in the property every time I create a new node, because it should be the same every time for all sub nodes.

    So, can I make the value recurs down to all sub nodes?
    If not is it possible to say something like [#topnode.property] (It's is used to send a value to a UserControl)?

    or how should I do this?

    While writing this I think that i could maybe do it in the UserControl with something like this:
    Pseudo:
    if node.property = "" then
     Variable = topnode.property
    else
     Variable = node.property

    What is your opinion on this approach?

    /Lars

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jul 10, 2010 @ 14:57
    Morten Bock
    0

    I think the syntax for a recursive parameter is [$YourPropertyAlias] but I'm not 100% sure. Try it out.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jul 10, 2010 @ 16:35
    Matt Brailsford
    0

    Hi Lars,

    You can find info on paramter syntax, including recursive paramters, at the following location

    http://umbraco.org/documentation/books/macro-parameters-syntax/advanced-parameter-syntax

    Many thanks

    Matt

  • Lars Mortensen 90 posts 98 karma points
    Jul 10, 2010 @ 17:08
    Lars Mortensen
    0

    Thank you both, I should just use [$YourPropertyAlias]

    Thanks Matt, for the link to a good ressouce

Please Sign in or register to post replies

Write your reply to:

Draft