Last updated 9 September 2014. Created on 15 August 2013.
Edited by slybud, davidhk, okeedoak, jcisio. Log in to edit this page.

This page contains tips and tricks to customize the DnD library.

Preview of atoms

You can enhance the power of the default library by adding preview of media atoms when hovering them with the mouse in the library, as shown on this screenshot : Preview of a media atom in the Scald dnd Library
Fot that, you will need to install the qTip Module with the following steps :

  • Go to the module page
  • Download the latest 1.x version
  • Place the qTip js libbrary into you sites/all/libraries folder (url given in the README.txt file of the qtip module)
  • Enable the qtip module
  • Enjoy !

For those who want to use the 2.x branch of the qTip module, you will have to do some extra-patching :

Customize the search page

The DnD library's search page is built using the scald_library view. It is easy to add fields to, or remove them from the search page.

First clone the scald_library view and give it a new name, eg scald_library_yoursite.

Edit the view's Filter criteria to add / delete / change the fields that will be used in the search. Then go to Page settings and edit the Path: to have a new and unique path, eg /scald/library_dnd_yoursite

Save the view.

Next go to the Configuration menu and choose Content authoring > Drag and Drop Library (admin/config/content/dnd). Choose your cloned view from the Library dropdown, and click "Save configuration".

Now when you use the DnD library's search, you'll see the customised search page you've just created.

The default library

The default library is stored in the variable dnd_callback_url (Views-based library or not).

Use a different library

To create a new library, you can either implement hook_dnd_libraries_info() or clone the default Views-based library provided by scald_dnd_library module. The scald_dnd_library module implements hook_dnd_libraries_info() to declares all views with "provides dnd library" definition as dnd libraries.

Filter atoms in the library

Add contextual filter into the view.

Preview of an atom34.63 KB

Looking for support? Visit the forums, or join #drupal-support in IRC.


sparky888’s picture

As an alternative to creating multiple libraries, if you want to have images and media only display for the current user that created them (similar to a personal library), you can modify the scald_atoms and scald_library views.

Create a relationship of User: Content authored, then create a filter of User: Current (yes) for both views.

When the user edits their article (or content type with atom references), upon opening the Scald library, they will only see the atoms and media they authored.

The final page view of the media will still show up for all users that have permissions to view.