Modifier: is_url


Returns true if a string is a valid URL.

YAML
a_url: http://google.com/
not_a_url: waffles
Template
{{ if a_url | is_url }}
{{ if not_a_url | is_url }}
Output
true
false

Additional Reading

Learn how to use and chain modifiers in the Antlers template guide.

Last modified on August 13, 2018