Last updated May 22, 2013. Created on September 12, 2010.
Edited by kalman.hosszu, jwilson3, lsolesen, jptaranto. Log in to edit this page.

There is a single hook necessary to implement an additional slideshow skin.

Drupal 7:

<?php
/**
 * 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

<?php
/**
 * 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;
}
?>

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

Comments

julianmancera’s picture

Hi

Where to find an example of an starting skin or a module with skins?

Thank

Julian Mancera

piogi’s picture

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')
   ),
 );
}
agent_nico’s picture

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 :)

Leagnus’s picture

D7: i've tried both hooks with no success. In Views in section "skin" of Views Slideshow i'm having default skin only. Cache is cleared.

<?php
/**
 * Implements hook_views_slideshow_skin_info().
 */
function modulex_views_slideshow_skin_info() {
  return array(
    'skin_name' => array(
      'name' => t('frontp_slider'),
      'class' => 'fpsl', //You may chain multiple classes.
      'module' => 'modulex',
      'path' => 'views_slideshow_skins',
      'stylesheets' => array(
        'main.css', // General styles to apply to all your skins.
        'skin_frontp_slider.css', // Styles specific to the selected skin.
      ),
    ),
  );
}

//

this module`name appears in section "skin" of Views Slideshow, but doesn't work – i've got

global wrapper.