Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

pm_if_no_articles

pm_if_no_articles & pm_if_articles

Summary:

This is a simple plugin which counts the number of articles in a given category and provides conditional tags which you can use to show or hide elements of your site based on whether there are zero or more than zero articles in the category. This plugin has only been tested with Textpattern version 4.0.3

pm_if_no_articles

Attributes: 

  • category
    • [category_name] - the name of the category you want to check.
    • # - checks the current category (default setting)

Example Usage:

<txp:pm_if_no_articles>
   <p>There are no articles in this category</p>
</txp:pm_if_no_articles>  

is the same as, 

<txp:pm_if_no_articles category="#">
   <p>There are no articles in this category</p>
 </txp:pm_if_no_articles>  

...or you can try: 

<txp:pm_if_no_articles category="My-Category">
   <p>There are no articles in My-Category</p>
</txp:pm_if_no_articles> 
 
 

pm_if_articles

Attributes: 

  • category
    • [category_name] - the name of the category you want to check.
    • # - checks the current category (default setting)

Example Usage: 

<txp:pm_if_articles>
   <p>Articles exist in this category</p>
</txp:pm_if_articles>  

is the same as, 

<txp:pm_if_articles category="#">
   <p>Articles exist in this category</p>
 </txp:pm_if_articles>  

...or you can try: 

<txp:pm_if_articles category="My-Category">
   <p>Articles exist in My-Category</p>
 </txp:pm_if_articles>  
 
 
 

Changelog 

  • v0.1 - 17 Dec 06 - initial release
  • v0.2 - 19 Dec 06 - added pm_if_articles tag

 

Article Request Count:
Initially released:
17-Dec-2006
Posted here:
17 Dec 2006

You know you want to visit the Archives.
Published with Textpattern