Last updated April 2, 2013. Created by redndahead on September 12, 2010.
Edited by jwilson3, lsolesen, jptaranto. Log in to edit this page.
There is a single hook necessary to implement an additional slideshow skin.
Drupal 7:
/**
* Implements hook_views_slideshow_skin_info().
*/
function mymodule_views_slideshow_skin_info() {
return array(
'pager_right' => array(
'name' => t('Pager Right'),
'class' => 'pager-right mymodule-slideshow', //You may chain multiple classes.
'module' => 'mymodule',
'path' => 'css',
'stylesheets' => array(
'mymodule_slideshow.css', // General styles to apply to all your skins.
'mymodule_skin_pager_right.css', // Styles specific to the selected skin.
),
),
);
}Usage example for Drupal 7
None provided at the moment. Please add yours.
Drupal 6:
Usage Example for Drupal 6
/**
* Implements hook_views_slideshow_skins().
*
* title = Title of the skin (required)
* class = class name of the skin. (recommended)
* module = name of the module where the skin is located
* path = path where the stylesheets are located within the modules directory
* stylesheets = array of stylesheets to include on the slideshow page
*
* @return
* $skins = an array of the skin information above
*/
function mymodule_views_slideshow_skins() {
$skins['pager_right'] = array(
'class' => 'pager-right',
'title' => t('Pager Right'),
'module' => 'demo_module',
'path' => 'skins',
'stylesheets' => array('pager_right.css'),
);
return $skins;
}
Comments
View Slide show starter Skin
Hi
Where to find an example of an starting skin or a module with skins?
Thank
Julian Mancera
Wrong example
The example is wrong, the correct one is this way:
function your_module_views_slideshow_skin_info() {return array(
'skin_name' => array(
'name' => t('Name'),
'class' => 'skin-class',
'module' => 'your_module',
'path' => 'skins',
'stylesheets' => array('skin.css')
),
);
}
New Skin
Hi,
I try to find a way to switch between several slideshow skins and to add new skin. I found a field "skin" when I parameter a slideshow but the only value is default. So, I'm wondering if your example can help me.. But I don't know how test it... I don't know where put the function ... Please, help me :)