Skip to content
dadaniels edited this page Feb 13, 2015 · 8 revisions

getTagCloud

Returns a list of terms and count how many pages are in each one. Similar to getPageTerms but this includes a page count.

Usage

Commonly you would put this Snippet on the pages being classified or on the templates used by those pages.

[[getTagCloud]]

You can specify some custom formatting:

[[getTagCloud? 
    &innerTpl=`<span class="myclass"><a href="[[~[[+id]]]]">[[+pagetitle]]</a>: ([[+count]])</span>`
    &outerTpl=`<div id="tagcloud">[[+content]]`
]]

REMEMBER: the placeholders available to the &innerTpl Chunk/formatting-string are limited to [[+id]], [[+pagetitle]], and [[+count]]

Parameters

  • outerTpl Format the Outer Wrapper of List using a Chunk or formatting string. Use the [[+content]] placeholder to indicate where the innerTpl's should appear. (Optional) Default: <ul>[[+content]]</ul>
  • innerTpl Format the Inner Item of List using a Chunk or a formatting string. The placeholders available here are very limited to keep the Snippet fast. They include only id, pagetitle, and count. Default: <li><a href="[[~[[+id]]]]">[[+pagetitle]]</a> <strong>([[+count]])</strong></li>
  • limit Limit the result, default to 10 : setting it to 0 will show all
  • includeEmpty include all terms (disregard if it's assigned to certain page)
  • sortByCount set this to 1, if you want to sort the Tags by pages count: Default to 0
  • sortCountDir if sortByCount is set to 1, sort direction : Default to DESC
Clone this wiki locally