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

rcb_if_month

Description

This plugin will execute the contained statements if the ‘month’ parameter (see note below) has been set in the URL. Execution can optionally be dependent on the value of ‘month’. The tag may also be used with <txp:else /> to execute an alternative set of statements if the condition returns false.

Note – the ‘month’ parameter is native to Textpattern and enables the filtering of articles by posted date. That is, filtering is not actually limited to month (as its name suggests) but we’ve stuck to that naming convention for this plugin. The ‘month’ (i.e. date) is passed in the URL like this: ?month=2009, or ?month=2009-02

Attributes (optional)

  • month. E.g. month=“YYYY, month=“YYYY-MM” or month=“YYYY-MM-DD”

Syntax


<txp:rcb_if_month>
	Executed statements
</txp:rcb_if_month>


<txp:rcb_if_month month="YYYY-MM-DD">
	Statements executed if dates match
	<txp:else />
	Statements executed if dates don't match
</txp:rcb_if_month>

Article Request Count:
Keywords/tags:
Initially released:
19/02/2009
Posted here:
19 Feb 2009

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