soo_if_frontpage Page 1 of 2 »
soo_if_frontpage
Summary:
Check if current page is a section front page
Download
soo_if_frontpage version 0.1.3 (0.4 KB)Overview
Similar to the glx_if_frontpage tag from the no-longer-supported glx_if plugin. Most of glx_if’s functionality is now available through core Txp tags, but not this (well, not without an absurd stack of conditional tags). To glx_if_frontpage it adds txp:else /> compatibility, and a couple of attributes for more control.
soo_if_frontpage evaluates to true if the current page context is:
- an article list, and;
- not search results, and;
- not a listing of articles by category, and;
- not a listing of articles by author, and;
- not a listing of articles by month, and;
- (optionally) in one of the sections listed in the
sectionattribute, and; - (optionally) a single-page list or the first page of a multi-page list, if the
pgattribute is set.
Usage
<txp:soo_if_frontpage> ... <txp:else /> ... </txp:soo_if_frontpage>
Attributes
None required.
section(Txp section name[s])
Comma-separated list of allowed sections.pg(boolean) default false
Whether or not to check for the “pg” URL query param (e.g.,http://my-site.com/?pg=2).
Setpg="1"to allow only single-page lists or the first page of a multi-page list.
Version History
0.1.3 (6/22/2010)
Fixed bug: section front pages now treated correctly (thanks, Victor)
0.1.2 (7/2009)
Added author and month search to the conditions to check against
0.1.1 (7/2009)
Added pg attribute; code and documentation cleaning; updated plugin template
0.1 (1/2008)
soo_if_frontpage tag with section attribute
- soo_if_frontpage
- Next








