Article

Drupal 7 slideshow gallery per node page with thumbnails optional

How to create a slideshow gallery per node or page content

Option 1: Field Slideshow and Field Collection modules

Provides a Slideshow formatter for Image fields, using JQuery Cycle plugin.Compared to Views slideshows, building the slideshow from multiple nodes, this module builds it from a single node, with a multi-valued Image/Media/Field Collection field.

https://www.drupal.org/project/field_slideshow

  1. Install and enable the module, take note of required libraries
  2. Follow step by step instructions as found here - http://drupalquests.blogspot.com/2012/01/drupal-7-create-slideshow-insid...
  3.  

Option 2: Views Slideshow module (usage as a block embedded in Content Type TPL file)

Views Slideshow can be used to create a slideshow of any content (not just images) that can appear in a View. Powered by jQuery, it is heavily customizable: you may choose slideshow settings for each View you create.

https://www.drupal.org/project/views_slideshow

  1. Install Views Slideshow and all necessary plugins and required module dependencies
  2. Create a Views block with the following settings (see also screenshots):
    • Format:Slideshow | Settings

    • Show:Fields | Settings

    • Content: Image

    • Filter and Sort: as needed and required

    • Important!
      Add a Contextual Filter: Content: Nid
      Adding the node ID will tell views to display the slideshow block according to the node and page being viewed

      Under configuration of contextual filter, choose 
      Provide default value
      Type: Content ID from URL

      Slideshow Gallery Block
      Slideshow Gallery Block with Contextual Filter set to Content Node ID

  3. Save block and check if available from the Structure > Blocks listing page

  4. Configure this block to assign a region; set other settings as needed

  5. Create or edit your template file (.tpl) for this content type to insert or embed this block using PHP; you may try below PHP snippet or similar:

    <div>
    
        <!-- Start, Property slideshow gallery -->
    
           <?php print views_embed_view('slideshow_gallery_per_property', 'block_slideshow_gallery', $node->nid); ?>
    
        <!-- End, Property slideshow gallery -->
    
    </div>