Copied to clipboard

Flag this post as spam?

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


  • Ivan 139 posts 302 karma points
    Jan 10, 2011 @ 14:20
    Ivan
    0

    Inline Macro with dynamic parameter?

    Hi.

    I am trying to parse a variable to a Macro using RequestQuery String this way:

     <umbraco:Macro AreaID="{umbraco.library:RequestQueryString('areaid')}" Alias="[XSLT]AreaHeader" runat="server"></umbraco:Macro>

    Problem is that instead of the real value i am getting only text "{umbraco.library:RequestQueryString('areaid')}".

    Is it possible to get a querystring variable value inline? How?

    Thanks for your help!

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Jan 10, 2011 @ 14:29
    Chriztian Steinmeier
    1

    Hi Ivan,

    Yes - you can do that with the "Advanced Macro Parameter Syntax" (http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax)

    In your case you'd use [@areaid] in the attribute:

    <umbraco:Macro AreaID="[@areaid]" Alias="[XSLT]AreaHeader" runat="server"></umbraco:Macro>

    /Chriztian

  • Ivan 139 posts 302 karma points
    Jan 12, 2011 @ 19:09
    Ivan
    0

    Thanks Chriztian!
    Best Regards, Ivan

Please Sign in or register to post replies

Write your reply to:

Draft