-
Notifications
You must be signed in to change notification settings - Fork 4
getTagCloud
Everett Griffiths edited this page Mar 17, 2015
·
8 revisions
Returns a list of terms and count how many pages are in each one. Similar to getPageTerms but this includes a page count.
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=`myInnerChunk`
&outerTpl=`<div id="tagcloud">[[+content]]</div>`
]]
Where myInnerChunk
is:
<span class="myclass"><a href="[[~[[+id]]]]">[[+pagetitle]]</a>: ([[+count]])</span>
REMEMBER: the placeholders available to the &innerTpl Chunk/formatting-string are limited to
[[+id]]
,[[+pagetitle]]
, and[[+count]]
-
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)
- sort column to sort by. Current possible values are pagetitle, id, or count.
-
dir Sort direction (applied if
sort
specified): Default to DESC
© 2014 and beyond by Craftsman Coding