Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Is there a way to get the property values recursively in usercontrol?
Thanks,
Sherry
Hi Sherry,
Do you mean the properties you create in the macro?
Sincere regards,Eduardo Macho
Hi Eduardo,
I'm referring to the property that I created on the document type. :D
Can you tell me what you intend to do? So I could find an appropiate solution.
SIncere regards,Eduardo
kipusoep wrote some C# helper methods he detailed in a blog post, and one of them is GetPropertyValueRecursive, which should do the trick
http://tech.kipusoep.nl/wp-content/uploads/2010/07/UmbracoExtensions.cs_.txt
from: http://tech.kipusoep.nl/2010/07/23/umbraco-45-visual-studio-2010-dotless-jquery-vsdoc-squishit-masterpages/
You can also pass a recursive property as a parameter to you macro:
<umbraco:Macro Language="[$language]" Alias="Menu" runat="server"></umbraco:Macro>
This is used on a content page while the language property is defined on the home (highest) node.
Jeroen
If you mean, how to pass a property as a parameter to an xslt macro, you can do it like the following:
Here contentProperty is the name of the parameter of the macro, and the property of the document type i'm passing is "MainContent"
<umbraco:Macro ID="Macro1" contentProperty="MainContent" Alias="ContentBox" runat="server"/>
You can then get the value of the property using:
<xsl:variable name="contentProperty" select="/macro/contentProperty"/><xsl:value-of select="$currentPage/data [@alias=$contentProperty]" disable-output-escaping="yes" />
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get recursive property values in usercontrol
Hi,
Is there a way to get the property values recursively in usercontrol?
Thanks,
Sherry
Hi Sherry,
Do you mean the properties you create in the macro?
Sincere regards,
Eduardo Macho
Hi Eduardo,
I'm referring to the property that I created on the document type. :D
Sherry
Hi Sherry,
Can you tell me what you intend to do? So I could find an appropiate solution.
SIncere regards,
Eduardo
kipusoep wrote some C# helper methods he detailed in a blog post, and one of them is GetPropertyValueRecursive, which should do the trick
http://tech.kipusoep.nl/wp-content/uploads/2010/07/UmbracoExtensions.cs_.txt
from: http://tech.kipusoep.nl/2010/07/23/umbraco-45-visual-studio-2010-dotless-jquery-vsdoc-squishit-masterpages/
You can also pass a recursive property as a parameter to you macro:
This is used on a content page while the language property is defined on the home (highest) node.
Jeroen
If you mean, how to pass a property as a parameter to an xslt macro, you can do it like the following:
Here contentProperty is the name of the parameter of the macro, and the property of the document type i'm passing is "MainContent"
You can then get the value of the property using:
is working on a reply...