getTagsFromNode() code not working - can Anyone see what I'm missing?? Options
b.shearer
Posted: Thursday, February 28, 2008 1:58:13 PM
Rank: Newbie

Joined: 2/28/2008
Posts: 1
Hello all,



I'm trying to get the tags from the article that's being displayed using Per's Tag Package.



I've got all the other tag library methods to work, but this one's stumping me and it's quite an important piece of functionality.



This is what I've currently got:



Code:


<xsl:variable name="currentID" select="macro/currentID"/>



<xsl:param name="currentPage"/>



<xsl:template match="/">

<ul class="tags">

<!--<xsl:for-each select="umbracoTags.library:getTagsFromNode($currentID)">-->



<xsl:for-each select="umbracoTags.library:getTagsFromNode('1140')">

            <li>

                        <a href="/?filterBy={current()}">

                        <xsl:value-of select="current()"/>

                        </a>

                       

                        (<xsl:value-of select="1 + 10"/>)

            </li>

</xsl:for-each>



</ul>

</xsl:template>





I was passing in the ID of the current article as the node ID, but that wasn't working, so I thought I'd test it by hard coding a node ID in that I knew had lots of tags and it still isn't working.



Can anyone see what I'm missing??



Many thanks in advance



lloydphillips
Posted: Monday, June 23, 2008 1:53:02 AM
Rank: Devotee

Joined: 5/22/2008
Posts: 67
Location: Auckland, New Zealand
Did you find a solution to this? I've getting a similar problem with the same method call.

Lloyd
Dirk
Posted: Monday, June 23, 2008 9:11:17 AM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
Hi guys,

I guess you have to add /tags/tag xpath selector in the for-each statement. At least, I use it this way on a number of sites.

If this is not working, I would recommend to write out the value of umbracoTags.library:getTagsFromNode() function call using xsl:copy-of

Hope that helps.

Regards,
/Dirk

level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.