TvTagCloud 1.0
Displays a tag cloud or list based on the tags stored in a template variable for each document.
Submitted: Jul 16th 2006 | License: GPL - GNU Public | Downloads: 1489
Description
TvTagCloud allows you to display your doument tags in a tag cloud or as an unordered list. When a user clicks on a tag it links them to a page displaying all documents containing the clicked tag.
This snippet requires the latest version of Ditto to function correctly.
Parameters:
- parent - folder that conatins the documents which are to be counted
- min - minimum number of tag occurances for tag to show, 0 for all
- landing - id of document to display ditto listings
- tvTags - the template variable that has the tags
- tagDelim - delimiter between tags in tvar
- displayType - [cloud | list] output as a tag cloud or an unordered list
- showCount - if you want the number of occurances to be displayed set to 1
Instructions
First thing you need to do is add a new template variable to the template you use for your documents. For this example I named mine docTags. Then go into each document and add some tags i.e. modx,snippet,ajax.
Next you need to setup the snippet call. Add the following snippet call to your page where you want to display the tag cloud:
[!TvTagCloud? &parent=`1` &landing=`22` &tvTags=`docTags` &showCount=`1`!]
To create the landing page that will display the pages when a tag is clicked create a new document with the following Ditto call:
[!ditto? &startID=`1` &tagData=`tvdocTags` &tagDelimiter=`,`!]