Copied to clipboard

Flag this post as spam?

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


  • kirkaholic 9 posts 21 karma points
    Apr 30, 2009 @ 08:19
    kirkaholic
    0

    XSLT Parameters

    I'm really digging umbraco, but I'm currently pushing a rock up the learning curve. I found a good thread to create a macro to output a link, but for some reason my parameters don't seem to be getting passed to the macro.

    Here's the macro code*:

    [code]

    ]>
    <>
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">













    [/code]

    And my call from my template:
    [code][/code]

    However my output comes out like this:
    [code][/code]

    So, for some reason the parameters that I'm passing are obviously not working. Any help is much appreciated!

    *thanks to dconlisk

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Apr 30, 2009 @ 08:25
    Ismail Mayat
    0

    kirkaholic,

    Change the 3 params namely

    [quote]
    nodeId

    class

    linkText

    [/quote]

    To variable see if that works so your code should be:

    [code]




    [/code]

    Regards

    Ismail

  • Paul Blair 466 posts 731 karma points
    Apr 30, 2009 @ 09:14
    Paul Blair
    0

    Hi,
    Just to be clear, what you shown is your XSLT - not your macro.

    You need to check that the parameters are also defined in your macro. And it is case sensitive. If you've done all that then I will usually put a:
    [code]

  • kirkaholic 9 posts 21 karma points
    Apr 30, 2009 @ 15:05
    kirkaholic
    0

    Spider nailed it. I didn't declare the parameters in the macro. I knew it would be something simple but this was a big leap up the learning curve. Thanks!!!

  • 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