Copied to clipboard

Flag this post as spam?

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


  • pnr 131 posts 226 karma points
    Nov 17, 2009 @ 09:51
    pnr
    0

    Problem with macro's in content

    I am making a replace of the content when i render it (thanks too dandrayne :-))

    But if i have some macro's in my content the macro will not show. Can anyone tell me what the problem is?

    Thanks in advance!

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
           
    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"
           
    exclude-result-prefixes="msxml umbraco.library">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <xsl:variable name="replaceThis">
           
    <xsl:text>class="nofollow"</xsl:text>
    </xsl:variable>
    <xsl:variable name="replaceWith">
           
    <xsl:text>rel="nofollow"</xsl:text>
    </xsl:variable>
    <xsl:value-of select="umbraco.library:Replace($currentPage/data[@alias='bodyText'], $replaceThis, $replaceWith)" disable-output-escaping="yes" />

    </xsl:template>

    </xsl:stylesheet>
  • Christian Palm 278 posts 273 karma points
    Nov 17, 2009 @ 09:59
    Christian Palm
    0

    You need to call umbraco.library:RenderMacroContent(string Text, int PageId)

    <xsl:value-of select="umbraco.library:RenderMacroContent(umbraco.library:Replace($currentPage/data[@alias='bodyText'], $replaceThis, $replaceWith), $currentPage/@id)" disable-output-escaping="yes" />

  • pnr 131 posts 226 karma points
    Nov 18, 2009 @ 10:59
    pnr
    0

    Thanks very much!

Please Sign in or register to post replies

Write your reply to:

Draft