dotCMS - Open Source Content Management System, Ondemand CMS, and Professional Support

Document Search

Article Information

Since Version: 1.6.5
Tags: Tag Cloud
Updated: 9/19/2008 1:41:25 PM
By: Dean Gonzalez
Doc id: 153332
Print Page: Export to PDF

Tag Cloud

This macro generates a list of tag links with all the tags used on the content of the given structures, every link generated is associated one of the following css classes [xSmallTag, smallTag, mediumTag, largeTag, xLargeTag] depending on the usage of the tag.

Macro Overview:

Syntax:

#tagCloud(structureNames url maxNumberOfTags)

Arguments:

  • structureNames
    The list of structure names you want to use to pull the tag usage. ["name1", "name2", ...]
  • url
    The url that is going to be used to link the tags in the cloud. To this url the macro adds the tag and the tag count as parameters of this url. <your url>?tag=<tag>&tagCount=<N>
  • maxNumberOfTags
    Maximum number of tags to display on the listing, if 0 is provided then all the tags will be listed

Optional Parameters:

  • ignoredTags
    A list of tags you want to be ignored by the macro, I.E. [tag1,tag2]

Usage:


Examples:

Example 1: A simple example using the required fields

#tagCloud(["White Papers", "Blogs", "Testimonial"] '/mypage.dot' 40)

Example 2: An example showing how to include one or more of the optional parameters

#set($ignoredTags = ["tag1", "tag2"])

#tagCloud(["White Papers", "Blogs", "Testimonial"] '/mypage.dot' 40)



Post a Comment


Add Comments

   

 
Post