app/AppKernel.php:
.../** * @return array */
public functionregisterBundles()
{
returnarray(
...
newChaplean\Bundle\OutdatedBrowserBundle\ChapleanOutdatedBrowserBundle(),
);
}
...app/config/config.yml:
# default optionchaplean_outdated_browser:
background_color: '#f25648'color: '#ffffff'lower_than: 'transform'template: 'ChapleanOutdatedBrowserBundle:Template:outdated.html.twig'lower_than can take:
- "IE11","borderImage"
- "IE10", "transform" (Default property)
- "IE9", "boxShadow"
- "IE8", "borderSpacing"
Add this bundle in assetic config:
assetic:
bundles: ['ChapleanOutdatedBrowserBundle']Include a routing in global routing
app/config/routing.yml:
chaplean_outdated_browser_bundle:
resource: "@ChapleanOutdatedBrowserBundle/Resources/config/routing.yml"prefix: /In layout html add me simply:
Version unminified:
<scripttype="text/javascript" src="{{ path('chaplean-outdated-browser.js') }}"></script>Version minified:
<scripttype="text/javascript" src="{{ path('chaplean-outdated-browser.min.js') }}"></script>