Copied to clipboard

Flag this post as spam?

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


  • Alexandru 112 posts 272 karma points
    Oct 02, 2013 @ 09:32
    Alexandru
    0

    Tags Macro

    Hi,

    I am working on an XSLT macro that displays the tags of a certain blog post and I get this:

    System.FormatException: Input string was not in a correct format.

    when I use this:

    <xsl:variable name="tags" select="tagsLib:getTagsFromNode(@id)" />
    

    Anyone got any idea why? The exact same code seems to work on another XSLT that lists the blog posts on the homepage.

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 02, 2013 @ 09:45
    Chriztian Steinmeier
    100

    Hi Alexandru,

    That's very likely because of the @id being empty - context is important, especially in Umbraco XSLT (I've tried to explain it here) - usually you just need to add $currentPage to get the right context:

    <xsl:variable name="tags" select="tagsLib:getTagsFromNode($currentPage/@id)" />
    

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft