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

soo_if_frontpage

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;
  • not an image page, and;
  • (optionally) in one of the sections listed in the section attribute, and;
  • (optionally) a single-page list or the first page of a multi-page list, if the pg attribute is set.

Information and download.

Why? I was cleaning out some Txp cruft and was going to get rid of this little plugin, which I’ve been using privately for years. But re-discovered that it is genuinely useful for at least one small but important situation: styling the Home link in a nav bar. I want to give this an “active class” only if it is truly the home page, i.e. <http://my-site.com/>. Very cumbersome to do this with only core Txp tags.

Article Request Count:
Keywords/tags:
Initially released:
2009/07/08
Posted here:
08 Jul 2009

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