Skip to content

TagCloud Module

Documentation > Modules > TagCloud Module

Description

This module creates a customizable tag cloud for tagged pages. Tag Cloud module can be used both for creating plain tag cloud or 3D tag cloud.

Attributes

attributerequiredallowed valuesdefaultdescription
modeno3dnoneturns on 3D mode
maxFontSizenoanylengthvalue (in units of px, pt, em or %)300%font size for the most common tags
minFontSizenoanylengthvalue (in units of px, pt, em or %)100%font size for the least common tags
maxColornocolor definitionRRR, GGG, BBBeach in range 0-255128,128,192color for the most common tags
minColornocolor definitionRRR, GGG, BBBeach in range 0-25564,64,128color for the least common tags
limitnoany integer > 050how many tags should be displayed
targetnovalid page namesystem:page-tagsname of the target page where the links should lead to
categorynovalid category namenonelimits tags (and displayed pages when the tag is clicked) to the specified page category)
showHiddennotrue / yesfalseshows hidden tags, i.e. these starting with underscore (_)
urlAttrPrefixnoany stringnoneadds a given string as a prefix to parameters in URLs generated by each tag; it makes the module more compatible withListPagesandPagesCalendarmodules
skipCategoryFromUrlnotrue / yesfalseby default if you usecategoryparameter, it is also added as a parameter in URLs generated by the tags; if this option is enabled, name of the category is skipped
widthnointeger300sets width of the 3D Tag Cloud
heightnointeger300sets height of the 3D Tag Cloud

Notes

If you want to change font sizes, both maxFontSize and minFontSize must be defined and use the same size units.

If you want to change tag colors, both maxColor and minColor must be defined.

If you choose a custom target page make sure a module PagesByTag is there - otherwise there would be no point in linking the tags.

By default tags starting with the underscore "_" are hidden and are not shown by default. Use showHidden="true" to display them.

The 3D tag representation is based on the WP-Cumulus WordPress plugin.

Examples

[[module TagCloud minFontSize="1em" maxFontSize="2em" maxColor="8,8,8" minColor="200,200,228" category="news"]]

A working example of a 3D tag cloud can be found on our Snippet pages.

You can also put your TagCloud in the side menu (often located in page nav:side. This is sometimes nice 😉