Fancybox libraries for Plone
Project description
Introduction
Simple package which makes fancybox available in portal_javascript. This package does not change nor define any view or templates. It basically does nothing from the user point of view. It is usable for template developers to avoid several fancybox libraries registered from different products.
Problems
Please note, Plone often generates image URLs without extension suffix, eg. http://host/portal/news/news-item/image_preview returns correct image to the browser with correct content type set, but Fancybox does not handle such URLs correctly. Fancybox competitor, Thickbox, works fine in this situation. Please read http://groups.google.com/group/fancybox/browse_thread/thread/8df1379566348b48 Fast solution, which may help sometimes, is eg:
<a class="fancybox" tal:attributes="href string:${context/absolute_url}/image?ext=.jpg"> <img tal:attributes="src string:${context/absolute_url}/image_thumb" /> </a>
FAQ about Fancybox behaviour is here: http://groups.google.com/group/fancybox/browse_thread/thread/ec192bd4db92d496
Usage
Fancybox requires custom invocation of the library. You must write custom javascript which binds fancybox code to particular tag. Define your own JS file, register it (portal_javascripts, javascript_head_slot) and use jQuery syntax to bind fancybox to the tags:
jq(function() { jq("a.fancybox").fancybox(); });
More detailed configuration may be passed as arguments of fancybox() function. Please read http://fancybox.net/howto chapter 4 - Fire plugin using jQuery selector and Available options.
Changelog
0.1 - 2009-08-26
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for collective.fancybox-0.1-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0484e5607958b69923e6bab00d7218d2ebf9b67ae60a216432f8058483d811dc |
|
MD5 | 8494b0a73027e9ba8e8fa07e54952bd8 |
|
BLAKE2b-256 | 903665e357c458b0cb99ad12b4ba763ae4feca5e0dd00cf11db1d6d626317d67 |