Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Placing field slideshow

Last updated on
30 April 2025

There are several possibilities to display a field slideshow.

One possibility is to use the panels module and "Page manager" submodule from ctools . If you are not familiar with panels it may be the most complex solution to configure but it's also the most flexible.

Another option is to use the Display Suite module. The configuration is really instinctive but is limited to the node layout. For instance you will not be able to place the slideshow in a sidebar with it. On the other hand it's easy to create a 2 columns layout of a node.

If you want to place the slideshow in a region of the page like the footer or sidebar then you can opt for either a views block or by using one "node block" module: Node Blocks or Nodes In Block for instance. This gives you the ability to place the slideshow using the core block module.

Lastly there is always the code possibility. Some modules may help better understand which template file to use and what variables are available: Devel and Theme developer
Once you have a variable with the field_slideshow you can do something like this:

<?php hide($content['field_images']); ?>
and later
<?php if(!empty($content['field_images'])): print render($content['field_images']); endif; ?>

A detailed example

Here is a detailed example of one way to approach this:

  • Make a content type ('jQuery Cycle' in this example--you can name it anything you like.) Add an 'Image' field to it, and in the 'Manage Display' tab set Label to 'Hidden' and Format to 'Slideshow'.
  • Create a node of this content type (in this example, 'Front Page Images') and add images.
  • Use a tool to create a block from this node. (Views, Nodes In Block, Nodes In Block; perhaps Panels or Display Suite might also be possible here.)
  • Add a region in the .info file: regions[front_slideshow] = Front page slideshow
  • In Administration » Structure » Blocks, assign the block to the new region.
  • Add div for the block where it needs to go (in this example, page--front.tpl.php) :
    <div id="fp_slideshow">
      <?php 
        if(!empty($page['front_slideshow'])) {
          print render($page['front_slideshow']); 
        }
      ?>
    </div>
  • Optional: format the node type with: node--jquery_cycle.tpl.php

Help improve this page

Page status: Not set

You can: