extension_exists extension_exists(name) is a Twig function to work with an existing extension. For example: {% set exists = extension_exists('Bolt Configuration Notices Widget') %} {{ your code }}