c33s / simple-gallery-bundle
Simple drop-in propel / admingenerator galleries for Symfony2
Installs: 36
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
pkg:composer/c33s/simple-gallery-bundle
Requires
- php: >=5.3.3
- c33s/attachment-bundle: ~0.5
- propel/propel-bundle: ~1.2
This package is not auto-updated.
Last update: 2019-07-29 15:17:11 UTC
README
Simple drop-in propel / admingenerator galleries for Symfony2
THIS IS WORK IN PROGRESS! USE AT YOUR OWN RISK!
Quickdocs
- install
- add to appkernel
- enable admingenerator
fixtures.yml:
C33s\SimpleGalleryBundle\Model\Gallery:
    background:
        title:                      Background
        slug:                       background
        is_listed:                  false
        ImagesLoadFromDirectory:    app/propel/attachments/Gallery/background
        ImageFilePath:              app/propel/attachments/Gallery/background/gallery-avatar.jpg
twig:
simple example
<ul>
{% for item in single_gallery('GallerySlug').galleryItems %}
	<li><img src="{{ item.image|att_url('liip_imagine_filter_name') }}"></li>
{% endfor %}
</ul>
example with vegas slider:
$(function() {
    $.vegas('slideshow', {
  delay: 5000,
  backgrounds: [{% spaceless %}
   {% for item in single_gallery('background').galleryItems %}
    { src: '{{ item.image|att_url('header') }}', fade: 1000 }{% if not loop.last %},{% endif %}
   {% endfor %}
  {% endspaceless %}]
    })('overlay', {
     src: '{% image 'media/components/vegas/dist/overlays/06.png' %}{{ asset_url }}{% endimage %}'
 });
});