Content last modified Monday 6 March 2017
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
Article modified:
17 Jun 2007

If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (1)

Great Plugin, Will there be a option to use section & category n the near future?

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern