rah_if_gps

Published under current TXP projects

A tiny conditional plugin for Textpattern CMS. Used to match URI’s GET-values. Displays the contained block if the condition returns true.

Download rah_if_gps v0.4

Image: rah_if_gps

Image: rah_if_gps

Intro and description

The plugin shows the wrapped block when the URL’s GET parameter’s value matches the condition.

Attributes

The tag is a container <txp:rah_if_gps>###</txp:rah_if_gps> and the attributes follow.

att
The GET parameter’s name.
Default: att="" Example: "foo"

val
The value of the GET parameter.
Default: val="" Example: "bar"

Example

<txp:rah_if_gps att="info" val="history">
	Hello world!
<txp:else />
	Something else.
</txp:rah_if_gps>

It outputs the “Hello world!” when browser’s url is set to http://example.com/?info=history and “Something else”, when not.

Changelog

Version 0.4

Version 0.3

Version 0.2

Version 0.1