function template_preprocess_dnd_editor_item in Scald: Media Management made easy 6
File
- dnd/
modules/ dnd_test/ dnd_test.module, line 159
Code
function template_preprocess_dnd_editor_item(&$variables) {
list($i, $size) = array(
$variables['i'],
$variables['size'],
);
if ($i % 3 == 0) {
$img = 3;
}
else {
if ($i % 2 == 0) {
$img = 2;
}
else {
$img = 1;
}
}
$variables['image'] = theme('image', drupal_get_path('module', 'dnd_test') . '/img/item-' . $img . '-' . $size . '.jpg', '', '', array(
'class' => 'dnd-dropped',
'id' => 'dnd-id-' . $i,
));
}