Partial Exists Tag

Checks if a partial exists.


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.




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 →