Gopher

templates

Templates is Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

templates.Exists  

(name string) → bool

Exists returns whether the template with the given name exists. Note that this is the Unix-styled relative path including filename suffix, e.g. partials/header.html

Examples

{{ if (templates.Exists "partials/header.html") }}Yes!{{ end }}
Yes!
{{ if not (templates.Exists "partials/doesnotexist.html") }}No!{{ end }}
No!