Skip to content

Twig

phil/url-bundle
NameKindGives
url_displayfilterexample.com/shop for https://www.example.com/shop/; a text that is no address as it is
url_type(value, types = null)functionThe kind of a text, a Url or a TypedUrl among the accepted ones, or null
url_type_labelfilterThe brand's name of an international kind, YouTube; the case's name of another
{% set kind = url_type(shop.social) %}
<a href="{{ shop.social }}">{{ kind|url_type_label }} — {{ shop.social|url_display }}</a>