Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
1.2
About It:
Get it:
Rate it:
  • Helpful?
  • 7 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!

mdn_count

You heard it here first! The mdn_count plugin is used on this site and does a couple of minor things. This plugin will count the number of articles in a particular section. It will also count the number of articles with a given category (in either field 1 or 2). It returns the number. That’s it!

Currently at version 1.3. It will also count the number of articles in the intersection of section and category, and will take # as a reference to use the currently selected section or category for counting.

Usage:

<txp:mdn_count [section="sectionname"] [category="text"] />

NOTE: The items in square brackets are optional and the brackets should not be used in the construction of the tag.

    Parameters
  • section – This item is OPTIONAL. The plugin will return the number of articles in the given section name.
  • category – This item is OPTIONAL. The plugin will return the number of articles with the given category name, in either category1 OR category2.
    Notes:
  • There is some basic checking. The two parameters are optional, but it doesn’t make sense if BOTH are gone. I think that’s the only one it catches.
  • Section takes precedence over category if both are specified.

Examples:

<txp:mdn_count section="plugins" category="comments" />
will return the number of articles in the section ‘plugins’, categorized as ‘comments’

e.g.   there are articles categorized in ‘comments’ in the ‘plugins’ section.

<txp:mdn_count category="conditional" />
will return the number of all articles categorized as ‘conditional’

e.g.   there are articles categorized as ‘conditional’

Article Request Count:
Keywords/tags:
Initially released:
2004-11-22
Posted here:
25 Nov 2004

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