Copied to clipboard

Flag this post as spam?

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


  • overflew 87 posts 110 karma points
    Jul 08, 2010 @ 01:45
    overflew
    0

    Tags - @nodesTagged efficiency

    Hi all,

    I'm looking to use the Tags feature to have a large body of documents available to be tagged. (E.g. a few thousand, with 2-3 tags each).

    When I want to show the items associated with each tag, I'm curious about how the @nodesTagged call is calculated?

    (The example snippet from http://our.umbraco.org/forum/developers/xslt/9057-Question-about-Using-the-tags-datatype-video-tutorial shows:)

    <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>

    I'm wondering if there's an association stored somewhere in the database I haven't found yet, or if it's just iterating over the nodes looking for tagged items...

    I've also inquired separately if the Relation API can be used to link to tags...

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jul 08, 2010 @ 11:03
    Morten Bock
    0

    I think the tag datatype uses these tables in the database: cmsTagRelationship and cmsTags

    So the @nodesTagged will probably be calculated with a count() in the sql that retrieves the tags.

  • konradinho 1 post 21 karma points
    Nov 20, 2013 @ 22:57
    konradinho
    0

    number of tags for words - 3 1 4 1 -> @nodesTagged = 1.5

    number of tags for words - 3 1 5 1 -> @nodesTagged = 1.2

    I still do not understand why the variable @nodesTagged adopt these values​​. Can someone explain?

Please Sign in or register to post replies

Write your reply to:

Draft