Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Taking your approach on designing things actually makes it fun, more natural, and overall easier.

— Dominik, Developer

Partial:If_Exists Tag

Renders a partial if it exists.


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

{{ partial:if_exists src="mypartial" }}

Practically identical to the partial except if the view doesn’t exist it will just output nothing instead of throwing a “view not found” exception.

This tag goes hand in hand with the partial tag. You may be interested in the partial:exists tag if you need to do a more complicated conditional check in your template.




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



Any parameter you create will be passed through to the partial as a variable.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →