But then the property in "Yournode" would have to be empty and the same property in the parent needs to be filled.
See the way "recursive" works is that it looks in the current node, if the property is empty, then it looks in the parent node, if the property is still empty it looks at the grandparent. This goes on until the highest node it can find.
There might be a better solution out there that I am not aware of though. Personally, I would just use an XSLT macro to make this a bit more flexible.
How to use Parent node property to pass dynamic value in macro?
Hi All,
Here I stuck at a problem. hope some one can help.
Form this post i learnt how can we pass dinamica values to macro of user control. [ http://our.umbraco.org/wiki/reference/templates/umbracomacro-element ].
here it is stated that you can pass your current executing node's Document Type defines a property macro by using syntax like [#YourNodePropertyName].
now what i want is that i want to use the property of parent node.. lets say [#YourNode/ParentNode.PropertyName].
in short i want to pass parent node's property dynamically to macro for user cotnrol.
Please help me in this.
Thanks In advance,
Jigar
Well, you could set:
But then the property in "Yournode" would have to be empty and the same property in the parent needs to be filled.
See the way "recursive" works is that it looks in the current node, if the property is empty, then it looks in the parent node, if the property is still empty it looks at the grandparent. This goes on until the highest node it can find.
There might be a better solution out there that I am not aware of though. Personally, I would just use an XSLT macro to make this a bit more flexible.
I would advice you just pass the current executing node to the macro and find the id of the parent node in the user control by using this code.
Thanks guys,
I think i am found better option.
I am using [$MyPropertyNameOfParent] to do this. and i am getting this value in very specific way.
Thanks for all helps.
Regards,
Jigar
is working on a reply...