Copied to clipboard

Flag this post as spam?

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


  • Johan Plesner Hamann 105 posts 199 karma points
    Nov 13, 2010 @ 12:54
    Johan Plesner Hamann
    0

    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.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 13, 2010 @ 13:02
    Lee Kelleher
    1

    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.

  • Johan Plesner Hamann 105 posts 199 karma points
    Nov 13, 2010 @ 13:24
    Johan Plesner Hamann
    1

    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.

Please Sign in or register to post replies

Write your reply to:

Draft