Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

For a software dev like me who has no idea how to create a cute hand-drawn dashed line, this course just 100% works.

— Ira Zayats, 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 →
Hello there! Are you looking for the Statamic v2 documentation?