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
Can you send an ID from a content picker out through a marcro and into xslt and back?
I am new to Umbraco and I run 4.5
I am a man of few words when it comes to English. I hope the title explain what I try to ask about. if not...
Thanks from Johan
p.s. I know there are inline xslt, but I am not interested in right now.
Hi Johan,
Yes you can. For the macro parameter value, you can use the following syntax:
<umbraco:Macro runat="server" Alias="Macro1" Parameter1="[#name1]" />
Using the property alias (content picker) wrapped in square-brackets with a hash - will pass the value of the content picker through to your macro.
Then inside your XSLT you can return (output) whatever you want to do with that value. (e.g. getting the URL using NiceUrl?)
You can read more about the advanced macro parameter syntax here: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
Cheers, Lee.
Lee, It was really fast you answered my question. If I could high five you I'd do it on the spot.
Thanks for the reply.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Can you send an ID from a content picker out through a marcro and into xslt and back?
Can you send an ID from a content picker out through a marcro and into xslt and back?
I am new to Umbraco and I run 4.5
I am a man of few words when it comes to English. I hope the title explain what I try to ask about. if not...
Thanks
from
Johan
p.s. I know there are inline xslt, but I am not interested in right now.
Hi Johan,
Yes you can. For the macro parameter value, you can use the following syntax:
Using the property alias (content picker) wrapped in square-brackets with a hash - will pass the value of the content picker through to your macro.
Then inside your XSLT you can return (output) whatever you want to do with that value. (e.g. getting the URL using NiceUrl?)
You can read more about the advanced macro parameter syntax here: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
Cheers, Lee.
By the great beard of zeus!
Lee, It was really fast you answered my question. If I could high five you I'd do it on the spot.
Thanks for the reply.
is working on a reply...