This is an old revision of the document!


Different tests on the characteristics of a category. The returned value will be 0 if false and 1 if true.



Tests if the category has a given URL (the "URL" field in the category detail). To test if the category does not have a given URL, simply prefix the category URL with a "!".


Tests if the category contains any entries.


<tpl:CategoryIf has_entries="1">
 <p><a type="application/atom+xml" href="{{tpl:CategoryFeedURL type="atom"}}"
   title="{{tpl:lang This category's entries Atom feed}}" class="feed">{{tpl:lang Entries feed}}</a>

Display a text only if the category does not have the URL "my-category"

<tpl:CategoryIf url="!my-category">
  <p>A sample text</p>


The ! in front of the URL inverts the meaning of the test

Wiki powered by Dokuwiki.