wet_if_page is a Textpattern plugin providing a conditional tag. In article list mode, it takes a comma separated list of page numbers and compares it to the current page. The contained markup will be rendered when conditions are met, otherwise the “else” part is evaluated. wet_if_page works in articles, forms and page templates.
Usage:
<txp:wet_if_page page="1,8,15,47"> condition met <txp:else /> condition not met </txp:wet_if_page>
A typical use case is testing for the presence of the very first page in a sequence of article list pages to exclude the presentation of sticky articles on pages 2 ff:
<txp:wet_if_page> <txp:article status="sticky" /> </txp:wet_if_page>
NB: wet_if_page defaults to checking for the first page if the page attribute is not specified.
Required attributes
None.
Optional attributes
| attribute | description | default |
|---|---|---|
| page | Comma separated list of page numbers | “1” |
Licence
This plug-in is released under the Gnu General Public Licence.
Download
Get it here: wet_if_page.txt.
Change log
| Date | Version | Notes |
|---|---|---|
| 2006-05-27 | 0.1 | Initial release |