... use fancybox in album view

by admina last modified Nov 14, 2012 10:52 AM

install collective.fancybox

customize atct_album_view.pt

- insert these lines in head section:

<metal:slot fill-slot="javascript_head_slot">
<script language="javascript" type="text/javascript">
jq(document).ready(function() {
jq("a.fancybox").fancybox();
});
</script>
</metal:slot>

- change this part:

<a tal:define="id python:int(b_start)+int(repeat['image'].number()-1)"
tal:attributes="href string:${image/absolute_url}/view;
title image/Description;">

to:

<a tal:define="id python:int(b_start)+int(repeat['image'].number()-1)"
tal:attributes="href string:${image/absolute_url};
title image/Description;
rel string:albumgroupname
class string:fancybox;">

 

The class-atrribute 'fancybox' activates the fancybox, an arbitrary rel-attribute-nmae can be set, if it's supposed to be an album,

et voilà.

Filed under: , ,