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
Guys,in a template i call a macro where i want to use a DocType PropertyValue as parameter.TEMPLATE:
<div><umbraco:Macro LinkId="MoreInfoLink" Alias="LinkURL" runat="server"></umbraco:Macro></div>
In the macro/XSL 'LinkURL', when i want to use the LinkId parameter i get the text 'MoreInfoLink' (the propery-name) instead of the LinkId (int).
MACRO:
<xsl:copy-of select="/macro/LinkId" /> <!-- Gives "MoreInfoLink" instead of 1378 ex. -->
Can anyone help me with this?
Hello,
I think for this you have to use the following syntax to indicate you want the value of the property, not the string passed:
<umbraco:Macro LinkId="[#MoreInfoLink]" Alias="LinkURL" runat="server"></umbraco:Macro>
Hope this helps.
Cheers,
Michael.
Michael,
thanks for you're quit reply! It works fine.Now the most important thing...
Where can i find that information/documentation which says "[#variable]" is the variable's value... and more so i don't have to spam the forum?
Glad it helped you, and good question ;-)
Well, if an initial search on the site with the global search does not give anything helpful (it's not always easy to determine the best search terms...), you might want to have a look at the wiki pages.
For example, the macro info can be found at http://our.umbraco.org/wiki/reference/templates/umbracomacro-element, and, more specifically for the [#...] and other special notations, at http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax.
Also, can you maybe mark my previous post as "answer", to help others who look for similar problems?
Thanks!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
PropertyTypePicker as Macro Parameter
Guys,
in a template i call a macro where i want to use a DocType PropertyValue as parameter.
TEMPLATE:
<div>
<umbraco:Macro LinkId="MoreInfoLink" Alias="LinkURL" runat="server"></umbraco:Macro>
</div>
In the macro/XSL 'LinkURL', when i want to use the LinkId parameter i get the text 'MoreInfoLink' (the propery-name) instead of the LinkId (int).
MACRO:
<xsl:copy-of select="/macro/LinkId" /> <!-- Gives "MoreInfoLink" instead of 1378 ex. -->
Can anyone help me with this?
Hello,
I think for this you have to use the following syntax to indicate you want the value of the property, not the string passed:
Hope this helps.
Cheers,
Michael.
Michael,
thanks for you're quit reply! It works fine.
Now the most important thing...
Where can i find that information/documentation which says "[#variable]" is the variable's value... and more so i don't have to spam the forum?
Glad it helped you, and good question ;-)
Well, if an initial search on the site with the global search does not give anything helpful (it's not always easy to determine the best search terms...), you might want to have a look at the wiki pages.
For example, the macro info can be found at http://our.umbraco.org/wiki/reference/templates/umbracomacro-element, and, more specifically for the [#...] and other special notations, at http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax.
Also, can you maybe mark my previous post as "answer", to help others who look for similar problems?
Thanks!
Cheers,
Michael.
is working on a reply...