ONCE Template Tag

DO NOT USE. This Tag has been deprecated. Use CSS with nth positioning :first or the if shortcode if you need this functionality.

DEPRECATED – DO NOT USE

This tag has never worked as intended or as described in this overview. If you want something to only show up on the 1st item in a loop, use nth positioning with CSS, the :first  indicator or try out [if field="_position" value="1"] to check for the first row number instead.

Old Documentation: Usage

In many cases when doing an each loop, you may need to add markup, on the first item only. For example to apply a special CSS style or to add an “active” class for jQuery sliders, accordions or tabs. Adding to our chapters example, this next example adds a “first-chapter” class to the first chapter only:

[if chapters]
    <h3>Chapters</h3>
    <ul>
    [each chapters]
        <li [once] class="first-chapter"[/once]>{@post_title}</li>
    [/each]
    </ul>
[else]
    <p>Sorry, No chapters</p>
[/if]

Other Helpful Documentation on Template Tags

BEFORE and AFTER

Provides the ability to run a opening block in your template that will be output BEFORE and AFTER the loop.

EACH Loop Tag

Provides easy looping through related entries (from relationship fields), taxonomies and media upload fields within Pods Templates.

Example Template Tag Usage

Examples of Pods Templates using a mixture of tags

IF/ELSE Conditional Tag

Provides simple conditional logic for your Pods Templates