Go to main content

If first section

Contents

Syntax

<txp:if_first_section>

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

<txp:if_first_section>
    …conditional statements…
</txp:if_first_section>

The tag will execute the contained statements if the current section (usually one inside the container or form of a section_list) is the first in the currently displayed list.

Attributes

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

Examples

Example 1: Assign a specific id to the first item in the list

<txp:section_list wraptag="ul" break="">
    <li<txp:if_first_section> class="first"</txp:if_first_section>>
        <txp:section title="1" link="1" />
    </li>
</txp:section_list>

Other tags used: section, section_list.

Genealogy

Version 4.0.7

Tag support added.

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. :)