Articles


Media Colorbox

Media Colorbox



Posted byvarghese.t,24th Nov 2015

INSTALLATION

  • Place the media_colorbox directory into your Drupal modules directory (normally sites/all/modules).
  • Enable the module by navigating to: Administration » Modules

CONFIGURATION

  • For your configured media field, go to "Manage display" for the content type with that field and choose the "Media Colorbox" formatter, and configure it. Choose the view mode of the file using "File view mode" for how the media file will be displayed on the page, and the view mode used within Colorbox using "Colorbox view mode".
  • If you are using the Media module to display fields, configure the chosen view modes by navigating to: Administration » Configuration » Media » File types » Manage display Select the 'Colorbox Link' formatter for an image or text field, this will create a Colorbox link to the entity displaying the 'Colorbox view mode' inside the Colorbox. The 'Colorbox Link' formatter is only available for file entities (not node, user, taxonomy or any other type of entity). Therefore, it is not very useful on any but 'Default' view mode for the file type being configured - unless you use the 'Rendered file' formatter for a display setting and select a view mode that uses 'Colorbox Link'. If you are directly using a file field, configure the chosen view modes. You may want to create additional view modes using hook_entity_info_alter() or a module like Display suite.

Colorbox Captions ----------------- You may configure the Media Colorbox field formatter to use a text or text_long field of the Media file (file entity) being displayed as the caption in the Colorbox overlay. From the admin/config/media/file-types page select the 'manage display' link for any of the file types and

KNOWN ISSUES

The default theme implementation of theme_image_style() does not always include "width" and "height" attributes on the IMG tag. This causes colorbox to resize to zero. Override the theme_image_style() to include image dimensions, e.g. with :

Categories