Copied to clipboard

Flag this post as spam?

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


  • Bram Loquet 72 posts 102 karma points
    May 28, 2010 @ 11:04
    Bram Loquet
    0

    How to use the output of one xslt-macro as the input of another xslt-macro?

    Is it possible to use the output of one xslt-macro as the input of another xslt-macro,
    someting like the code below

    <umbraco:Macro title="[#<umbraco:Macro Alias="GetParentTitle" runat="server"></umbraco:Macro>]"
    Alias="GetTitle" runat="server"></umbraco:Macro>


  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    May 28, 2010 @ 11:12
    Dirk De Grave
    0

    Bram,

    Explain a bit more what you'd like to do, because it feels as if you need the title of a parent page? Can't you a recursive macro parameter to do that?

     

    Cheers,

    /Dirk

  • Bram Loquet 72 posts 102 karma points
    May 28, 2010 @ 11:21
    Bram Loquet
    0

    No Dirk,

    it's just a very simple/bad example I showed.

    I want to use some output from a macro as input for the next macro.
    I just want to keep the input from the second macro as a variable.

    Something more like this:

    <umbraco:Macro title="This is the subnavigation for: [#<umbraco:Macro Alias="DateTime" datetime="[@createDate]" format="yyy" runat="server"></umbraco:Macro>]"
     Alias="SubNavigation" runat="server">
    </umbraco:Macro>
  • Bram Loquet 72 posts 102 karma points
    May 31, 2010 @ 11:07
    Bram Loquet
    0

    Found  this on the old forum (http://forum.umbraco.org/yaf_postst2928_Include-macro-in-a-macro-possible.aspx)

    <xsl:variable name="newsMacro" select="string('&lt;?UMBRACO_MACRO macroAlias=&quot;DisplayNewsHome&quot; 
    numberOfItems=&quot;2&quot; startNode=&quot;1064&quot; displayProp=&quot;teaser&quot; showAsLI=&quot;2&quot;&gt;&lt;/?UMBRACO_MACRO&gt;')"/>

    <xsl:value-of select="umbraco.library:RenderMacroContent($newsMacro,
    number($currentPage/@id))" disable-output-escaping="yes"/>
  • 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