Go to main content

If search

Contents

Syntax

<txp:if_search>

The if_search tag is a conditional tag and always used as an opening and closing pair, like this…

<txp:if_search>
    …conditional statement…
</txp:if_search>

The tag will execute the contained statements if the called page is the result of a search.

Attributes

This tag has no attributes of its own. It accepts only the global attributes .

Examples

<txp:if_search>
    <link rel="stylesheet" href="<txp:css name="search" />">
<txp:else />
    <link rel="stylesheet" href="<txp:css />">
</txp:if_search>

Selects a stylesheet named ‘search’ when search results are being displayed, or a stylesheet determined by the active section for normal page display.

Other tags used: else, css.

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)