Hi,
I’m using
colorbox with the Gallery component, and it works fine.
My code in the <head> section:
<!-- colorbox -->
<link type="text/css" media="screen" rel="stylesheet" href="[[++site_url]]assets/css/colorbox/colorbox.css" />
<script src="[[++site_url]]assets/js/jquery.min.js"></script>
<script src="[[++site_url]]assets/js/jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
//Examples of how to assign the ColorBox event to elements
$("a[rel='galerie']").colorbox();
});
</script>
<!-- end colorbox -->
My ’thumbTpl’ specific chunk (named GalColorBoxItem):
<div class="[[+cls]]">
<a href="[[+image]]" rel="galerie" title="[[+name]]">
<img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
</a>
</div>
and my Gallery snippet calls within the ressource:
[[!Gallery? &thumbWidth=`120` &thumbTpl=`GalColorBoxItem` &toPlaceholder=`gallery`]]
[[!GalleryItem]]
[[!GalleryAlbums? &toPlaceholder=`galleries`]]
<h3>Albums:</h3>
<ul>
[[+galleries]]
</ul>
<hr />
[[!+gallery:notempty=`
<h3>[[+gallery.name]]</h3>
<p>[[+gallery.description]]</p>
[[+gallery]]
`]]