Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

This course is the most refreshing take on teaching design that I've come across.

— Mikaël Sévigny, Developer

Partial:Exists Tag

Checks if a partial exists.

Overview

You can use this tag to check if a partial exists. Useful if you have some sort of dynamic loop.

{{ if {partial:exists src="mypartial" } }}
It exists
{{ else }}
It doesn't.
{{ /if }}

This tag goes hand in hand with the partial tag.
You may be interested in the partial:if_exists tag to simplify your template.

Parameters

src

string

You can pass the name of the partial with a parameter instead of tag argument. Example: src="cards/author_bio" or :src="var_name".

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →