Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 594 posts 830 karma points
    Dec 07, 2011 @ 09:45
    Fredrik Esseen
    0

    Problems with RenderMacroContent

    Hi!

    Im trying to put the Cog navigation in a another macro and render it but it wont work.

    im using 4.7.1

    Are there a syntax error somewhere?

    <xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::*[@isDoc] [@level=2]/@id" />
      
      <xsl:variable name="macro">
    <![CDATA[<?UMBRACO_MACRO macroAlias="SubNavigation" startingLevel="2" recurse="1" selectBranches="3" maxMenuDepth="6" ulBaseClass="vertical" branchClass="branch" selectedClass="selected" expandChildren="1" forceHome="0" securityTrimming="1" runat="server" forceNode="]]><xsl:value-of select="$rootNode"/>
    <![CDATA["></?UMBRACO_MACRO>]]>
    </xsl:variable>

      <xsl:value-of select="umbraco.library:RenderMacroContent($macro, $currentPage/@id)" disable-output-escaping="yes"/>
  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Jan 25, 2012 @ 17:07
    Lee Kelleher
    0

    Hi froad,

    Not sure if you found a solution for this already?

    Does the XSLT throw a syntax error? (as the syntax looks fine to me).  Have you tried it with hard-coding the "forceNode" parameter?

    Wondering if there is a better way to do this, rather than using RenderMacroContent? As in trying to pass in the right nodeId into the CogNav directly?

    Cheers, Lee

  • Fredrik Esseen 594 posts 830 karma points
    Jan 26, 2012 @ 07:58
    Fredrik Esseen
    1

    Hi Lee!

    No I didnt find a solution to this but I did just as you suggested, I cahnged the way to approach the problem :)

  • 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