Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » [superseded] rah_if_search

#1 2008-09-06 22:16:40

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

[superseded] rah_if_search

Rah_if_search has been superseded by Textpattern core. As of Textpattern v4.3.0 release built-in tags can offer the same functionality as rah_if_search. Namely tags such as if_search, variable, if_variable and search_term. The variable tags offer an excellent way to do generic comparison operations, such as checking the searched term.

To compare the searched term to an user defined value:

<txp:variable name="search_term" value='<txp:search_term />' />

<txpif_variable name="search_term" value="cat">
	You searched for a cat.
<txp:else />
	You search for a <txp:search_term />.
</txp:if_variable>

Check if on a search results page:

<txp:if_search>
	...contained statement...
</txp:if_search>

Last edited by Gocom (2012-07-24 23:27:07)

Offline

  1. Index
  2. » Plugin support
  3. » [superseded] rah_if_search

Board footer

Powered by FluxBB