evercodelab / banner-bundle
Symfony2 bundle for managing site banners
Installs: 1 512
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 16
Forks: 4
Open Issues: 7
Type:symfony-bundle
Requires
- avalanche123/imagine-bundle: dev-master
- sonata-project/admin-bundle: dev-master
This package is not auto-updated.
Last update: 2018-06-29 09:54:22 UTC
README
Installation
Install using Composer:
./composer require evercodelab/banner-bundle
Add the bundle to your AppKernel.php:
$bundles = array( //... new Evercode\Bundle\BannerBundle\EvercodeBannerBundle(), );
Add it to your routing.yml:
EvercodeBannerBundle:
resource: "@EvercodeBannerBundle/Controller/"
type: annotation
In your templates, add:
{% render 'EvercodeBannerBundle:Banner:view' with {'place': 'Main_horizontal'} %}
You can optionally specify a filter to automatically crop/resize/compress your images using the AvalancheImagineBundle:
{% render 'EvercodeBannerBundle:Banner:view' with {'place': 'Main_horizontal', 'filter': 'banner_main_horizontal'} %}
See https://github.com/avalanche123/AvalancheImagineBundle#basic-usage for information on how to set up the filters.