Copied to clipboard

Flag this post as spam?

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


  • James Drever 118 posts 149 karma points
    Nov 17, 2010 @ 13:46
    James Drever
    0

    Passing a dynamic string containing a page property to a macro parameter

    I'm trying to pass a dynamic string containing a page property to a XSLT macro parameter.  The code in my template looks like:

    <umbraco:Macro Alias="FSCListofSubPageswithMenuImages" menuTitle="[#siteName] offers" runat="server"></umbraco:Macro>

    If I just include the page property, it works fine, but I was naively hoping that by adding in the additional text, the the page property would get rendered alongside the additional text.  Obviously not. It just renders "[#siteName] offers".

    I really want to reuse this macro generically (with or without including page properties) so trying to avoid doing doing too much in the XSLT - but before I give up, has anybody managed to do something equivalent to what I'm trying to achieve?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 17, 2010 @ 13:57
    Tom Fulton
    0

    I don't think it's possible, the quickest answer might be to just make another parameter called menuTitleAppend and use that for your additional text

  • James Drever 118 posts 149 karma points
    Nov 17, 2010 @ 14:48
    James Drever
    0

    Hi Tom, yeah thanks for that, I was thinking of that as a possible workaround, but thought I'd check I wasn't missing something obvious.

Please Sign in or register to post replies

Write your reply to:

Draft