Copied to clipboard

Flag this post as spam?

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


  • Jon Behrens 53 posts 77 karma points
    Sep 30, 2010 @ 00:56
    Jon Behrens
    0

    Macro parameter problem with 4.5

    I've got a macro that takes a parameter. The parameter value is not getting to the macro.

    The call is:

    <a href="~/"><umbraco:macro runat="server" alias="siteImage" theimage="crimson.gif"/></a>

    The macro is:

     <xsl:template match="/">
      <xsl:variable name="theImage" select="/macro/theimage"/>
      <img src='media/site/{$theImage}' alt='The Crimson Thread' />
     </xsl:template>

    The template gets called, but the value of 'theImage' is empty. I took this code from another of my sites running under 4.0 where it works.

    Thanks for any insight - Jon

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Sep 30, 2010 @ 09:50
    Sebastiaan Janssen
    0

    On the macro, you have to go to the parameters tab and create the param there.

  • Jon Behrens 53 posts 77 karma points
    Sep 30, 2010 @ 16:16
    Jon Behrens
    1

    That fixed it. Thank you.

  • Damiaan 438 posts 1290 karma points MVP 3x c-trib
    Nov 23, 2010 @ 20:33
    Damiaan
    0

    Thanks!  I found this nowhere else but here!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies