Voting starts in March for the Drupal Association Board election.
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 :
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 : https://www.drupal.org/node/2248337
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.