Copied to clipboard

Flag this post as spam?

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


  • Gary 40 posts 129 karma points
    Aug 14, 2013 @ 13:03
    Gary
    0

    Help with tagsLib:getAllTagsInGroup please!

    Hello,

    I have a number of tag groups which are displaying the tags correctly.

    My Issue is when the tags are clicked, I can't get the list of results to display.

    The code to generate the list of tags (which works) is this

    <xsl:if test="$currentPage/descendant-or-self::*/parent::*[@isDoc and @parentID='4253']">
            <xsl:if test="count(tagsLib:getAllTagsInGroup('tagsGroup1')//tag) > 0">
    
                <div class="ssnSubNode" style="background-color:#2484c6"><strong>Tag Group 1 Title</strong><img src="/media/276398/iconcctag.gif" class="ssnInfoIco"/></div>
                <ul>
                    <xsl:for-each select="tagsLib:getAllTagsInGroup('tagsGroup1')//tag">
                        <li style="padding:7px 0 0 10px;"><a href="tagResults?tag=(.)"><xsl:value-of select="."/></a> (<xsl:value-of select="@nodesTagged"/>)</li>
                    </xsl:for-each>
                </ul><br/>
            </xsl:if>
        </xsl:if>
    

    Im Using this code to generate the list of results but its not working.

    <xsl:variable name="nodeName" select="$currentPage/child::*/website//alias"/>
    
            <xsl:for-each select="$nodeName/*[@isDoc and (umbraco.library:Request('tag') = '' or contains(tags,umbraco.library:Request('tag')))]">      
                <p><a href="{umbraco.library:NiceUrl(@id)}" ><xsl:value-of select="@nodeName"/></a></p>         
            </xsl:for-each> 
    

    Does anyone have any idea where i'm going wrong or can lend any guidance on this?

    Any help is much appreciated.

    Thanks

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Aug 14, 2013 @ 14:16
    Dennis Aaen
    0

    Hi Gary,

    One thing I notice is that you are looping over tags, thats are empty, if I understands your code correctly. DonĀ“t know if this is supposed.

    Maybe you could try this and see if you have more luck with this.

    <xsl:variablename="nodeName"select="$currentPage/child::*/website//alias"/>

           
    <xsl:for-eachselect="$nodeName/*[@isDoc and (umbraco.library:Request('tag') !='' or contains(tags,umbraco.library:Request('tag')))]">      
               
    <p><ahref="{umbraco.library:NiceUrl(@id)}"><xsl:value-ofselect="@nodeName"/></a></p>        
           
    </xsl:for-each>

    /Dennis

  • Gary 40 posts 129 karma points
    Aug 14, 2013 @ 14:53
    Gary
    0

    Hi Dennis,

    thanks for taking the time to reply.

    I have just tried your suggestion but still nothing happens on the page where the results are supposed to be displayed.

    Many thanks

    Gary

Please Sign in or register to post replies

Write your reply to:

Draft