Copied to clipboard

Flag this post as spam?

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


  • wildlife 54 posts 74 karma points
    May 12, 2010 @ 04:09
    wildlife
    0

    Question about "Using the tags datatype" video tutorial.

    I completed the video about using tags and have a question. 

    I was able to successfully add

    <xsl:value-of select="data [@alias = 'tags']"/>

    to a news list that I had created in an earlier video to display tags for each of the news items.

    Then, I was able to get this section of code from the tutorial to work to display all the tags as links of varying sizes based on usage:

    <xsl:variable name="Factor" select="6 div Exslt.ExsltMath:max(tags:getAllTagsInGroup('default')/tags/tag/@nodesTagged)"/>
    <div class="tags">
    <xsl:for-each select="tags:getAllTagsInGroup('default')/tags/tag">
    <a class="tag{round($Factor * @nodesTagged)}x" href="?tag={.}">
    <xsl:value-of select="."/>
    </a>
    </xsl:for-each>
    </div>

    Now, what I'd like to do is to is to apply this second set of code to the news list so that only tags relating to each news item will show as clickable links instead of a list of all tags.  I don't necessarily need the Factor sizing on this but am not adverse to having it knowing that I can always change the style sheet if I'd like to change the font-size settings.  I tried changing the code from the above box to:

    <xsl:variable name="Factor" select="6 div Exslt.ExsltMath:max(tags:getTagsFromNode/tags/tag/@nodesTagged)"/>
    <div class="tags">
    <xsl:for-each select="tags:getTagsFromNode/tags/tag">
    <a class="tag{round($Factor * @nodesTagged)}x" href="?tag={.}">
    <xsl:value-of select="."/>
    </a>
    </xsl:for-each>
    </div>

    which changes

    getAllTagsInGroup('default')

    to

    getTagsFromNode

    But that produced errors.  Can anyone tell me how I can get the tags relating to each news item node to display as clickable links instead of as text?  Thanks in advance for any help that can be provided. 

Please Sign in or register to post replies

Write your reply to:

Draft