Skip to main content

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.

From FancyBox FAQ:

6. I`m using custom urls for images (for example,
index.php?action=dlattach;topic=3.0;attach=9;image) and FancyBox shows source
of image. Why?

FancyBox gueses content type from url but sometimes it can be wrong. The
solution is to force your type, like so - $(".selector").fancybox({'type' :
'image'});

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

1.3.4.1 (2012-01-04)

  • rename from collective.fancybox. [toutpt]

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

collective.js.fancybox-1.3.4.1.tar.gz (56.7 kB view details)

Uploaded Source

File details

Details for the file collective.js.fancybox-1.3.4.1.tar.gz.

File metadata

File hashes

Hashes for collective.js.fancybox-1.3.4.1.tar.gz
Algorithm Hash digest
SHA256 591bd4bff4c7cfbbc3b15b9298fc43e94d61ca715ca3bbc5a8d0eec8bcd2d84a
MD5 b09ac4211dedcffd19067d285ca401db
BLAKE2b-256 7d8948a73d8887a1f66c0060f631710085494f2630209e770f5c84526c6b5ee4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page