Help:Tagcloud format

Jump to: navigation, search
Tagcloud format
Displays queried data in a tagcloud
Further Information
Provided by: Semantic Result Formats
Added: 1.5.3
Removed: still supported
Requirements: none
Format name: tagcloud
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
Authors: Jeroen De Dauw , MWJames
Categories: misc
Class: SRFTagCloud, SMWResultPrinter
Folder: Commit history
Folder tree
Table of Contents

The result format tagcloud, part of the Extension "Semantic Result Formats" extension, can be used to display result values in a tag cloud. It has been written by Jeroen De Dauw for WikiWorks and is partly based on code from the FolkTagCloud extension.


Parameter Type Default Description
template text empty <srf-paramdesc-template>
userparam text empty <srf-paramdesc-userparam>
excludetags text empty Exclude tags (delimiter: ";")
includesubject yes/no no <srf-paramdesc-includesubject>
tagorder text alphabetical The order of the tags
increase text log How to increase the size of tags
widget text empty Available widget
class text empty Specify an additional cascading style sheet class
font text impact <srf-paramdesc-font>
height whole number 400 Height
width whole number 400 Width
mincount whole number 1 The minimum amount of times a value needs to occur to be listed
minsize whole number 77 The size of the smallest tags in percent
maxsize whole number 242 The size of the biggest tags in percent
maxtags whole number 1000 The maximum amount of tags in the cloud

With the deployment of SRF 1.8 the tagcloud format will support template inclusion,a sphere widget, class parameter, and wordcloud widget.


A simple example - displaying a tag cloud of authors of books:

{{#ask: [[Category:Books]]
| ?Has author
| format=tagcloud

Displaying a tag cloud of things with the most related items. The pages themselves are also listed, as they are related to themselves. Depending on the cloud order, the biggest tags are shown first (tagorder=desc) and limited by the parameter limit=.

Styling support

Assigning cascading style sheet classes (classs=) to a tagcloud query will influence its positioning, width/height etc.. The width= and height= parameters are only recognized by a widget type output.

.demo-30-percent-width {
.demo-float-right {
{{#ask: [[Category:Books]]
| ?Has author
| format=tagcloud
| class=demo-30-percent-width demo-float-right

Template support

In a scenario where a page title is represented by a unique ID rather than a human readable title a inclusion template can be used to retrieve and replace a tag with a human readable name (stored as property-value pair). (See example Template:tagcloud.tag.title)

Wordcloud widget

The widget shows tags as word cloud map using plug-in. (see here)

Sphere widget

The sphere output implements some basic settings but for a more elaborate option set, please adjust the JavaScript accordingly. (See available options).

The plugin that is used to create the sphere output requires that tags are a link type entity therefore normal text (of type string etc.) entities need to be converted into a link type using a template (see above) that creates a wiki link ( such as [[{{{1}}}]]). The class parameter can be used to position the tagcloud easily within a page.


This documentation page applies to all SMW versions from 1.5.3 to the most current version.
      Other languages: zh-hans

Help:Tagcloud format en 1.5.3