Find the Exponential Software extensions you want
UNIX name | Owner | Status |
---|---|---|
EabFancyGalleryBundle | 7x | stable |
Version | Compatible with |
---|---|
N/A | N/A |
A simple gallery bundle for eZ Publish, using FancyBox.
Andy Caiger acaiger@eab.uk
Copyright (C) 2014-2015 Enterprise AB Ltd
Licensed under GNU General Public License 2.0
Install EabFancyGalleryBundle using composer:
composer require --update-no-dev --prefer-dist eab/fancy-gallery-bundle
Composer will install the bundle and its dependencies into vendors.
You can use git to install into the src subtree:
git clone https://github.com/eab-dev/EabFancyGalleryBundle.git src/Eab/FancyGalleryBundle
Enable the bundle in the kernel by editing ezpublish/EzPublishKernel.php:
public function registerBundles()
{
$bundles = array(
// ...
new Sp\BowerBundle\SpBowerBundle(),
new Eab\FancyGalleryBundle\EabFancyGalleryBundle(),
// ...
);
}
Install the latest version of FancyBox:
php ezpublish/console sp:bower:install
php ezpublish/console assets:install --symlink
If when installing the bower assets you see an error message like:
ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/fancyapps/fancyBox.git", exit code of #128 fatal: unable to connect to github.com
the quick workaround is to disable the git: protocol:
git config --global url."https://".insteadOf git://
and run the install command again.
If your bundle is not extending eZDemoBundle, you need to tell EabFancyGalleryBundle
which pagelayout template to use. There are two easy ways to do this:
Edit ezpublish/config/config.yml:
eab_fancy_gallery:
pagelayout: AcmeMyBundle::pagelayout.html.twig
In your own bundle, edit a file such as src/Acme/MyBundle/Resources/config/services.yml and add:
parameters:
eab_fancy_gallery.pagelayout: AcmeMyBundle::pagelayout.html.twig
With this second method make sure that your bundle is loaded after EabFancyGalleryBundle.
The following settings can be configured in the same way as pagelayout:
You can also override the templates by copying Resources/config/override.yaml
into your own bundle's configuration and changing the controllers or templates
(hint: change the keys e.g. change image: to image_override:).
The FancyBox CSS is loaded by the gallery template. If you want to load it on
all pages you need to:
Edit your page_header_style.html.twig template and include the FancyBox CSS asset:
{% stylesheets filter='cssrewrite,?cssmin'
...
'bundles/eabfancygallery/components/fancybox/source/jquery.fancybox.css'
...
%}
{% endstylesheets %}
After installing this bundle you can run ezpublish/console sp:bower:install
to update the Fancybox assets at any time. Take care: it will update other
bower assets as well!