Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

slideshow integration with imagegallery-UC Please help me

Go to End

15 Posts   3145 Views


Community Member, 97 Posts

25 February 2010 at 2:43am

hello PatJnr
by saying this "able to use the images uploaded from cms admin panel" i mean to say that if i am uploading 3 images from my admin panel then all the images are showing at once.

thanks for the guidance i will give a try with your code .thank for the help hope this work.Will post the result


Community Member, 98 Posts

20 March 2010 at 7:58am

Hi. I'm trying to follow your suggestion, and I'm pretty sure it's what I need, I'm just not certain about the implemetation. I've created a "slideShow.php" in my /mysite/code folder file using your first group of code - is this correct? I've added the second group of code to my Page.php file, also in the same folder. I've found some scripts for js slideshows, and have created the js file (the file that is supposed to go in the head section) and placed that in the /mysite/javascript folder, and pointed the Requirements statement to that file. When I put the code that is supposed to go in the body into the HTML section of my page in the CMS, it also disappears. I also have the Image Collection module - do I need to get rid of that for this to work. I apologize for asking what may seem like very dense questions, but I am not as code savvy as you guys appear to be. Thank you for your patience.


Community Member, 97 Posts

21 March 2010 at 3:07am

hello jseth
we both are on the same ship even i am not that much code savy,
you have done almost everything correctly except the last part of coding
all the coding which is given here will come inside the page you have created.
the only thing is the later part will go inside the controller

the code should be like this

class slideShow extent Page
static $has_many = array(
'Images' => 'Resource'

public function getCMSFields() {
$f = parent::getCMSFields();
$fileMan = new ImageDataObjectManager(
'Name' => 'Name',
'Description' => 'Description'
$fileMan->setAddTitle( 'slideshow image' );
$f->addFieldToTab("Root.Content.SlideShowImages", $fileMan);
$f->addFieldToTab("Root.Content.SlideShowImages", new HeaderField(
$title = "Slide Show Images",
$headingLevel = "2"


return $f;

class slideShow_Controller extends Page_Controller {

function init() {


Please check out the curly braces whether they r correct or not.
and make sure that the path of js is given corretly.
No need to make any changes in Page.php

hope this helps you


Community Member, 98 Posts

23 March 2010 at 1:27am

Hi Rishi,
Ok, it's quickly apparent that my ship is way behind yours! Excuse my really dumb question, but when you say "the only thing is the later part will go inside the controller ", what then is "the controller"? I guess I need you to tell me exactly where the code goes - see, I'm WAY behind you! Thanks.


Community Member, 102 Posts

23 March 2010 at 3:49am

Hi jseth

Sorry you are getting lost but help me understand you problem better.
What slideshow a you trying to implement. and if you are getting any error please paste them and it will be easy to help you.
I dont want to give you my code because it will take you time to understand than fix the one you have being working on.

paste it and let's see.




Community Member, 98 Posts

23 March 2010 at 7:29am

Edited: 23/03/2010 7:30am

Hi Pat,
I don't have any code in particular that I love; I'm used to using, say something from, but that won't work the same with silverstripe. I put <iframe> code in the page where I wanted the slideshow and that worked fine if I wanted to click thumbnails to advance the slides, but I want them to fade out to the next slide, but implementing that looks like it takes more coding skill then I have at this time. I have looked at, but I would need much more time to practice and digest that tutorial than I have right at this time. I think we're going to just with a swf and be done with it! Thanks for your help.


Community Member, 98 Posts

23 March 2010 at 8:24am

Ok, I've found some code that would work well for what I want to do, but I don't know how to make it work. Here are the instructions and code. Would you know how to translate this into "silverstripe"? Thanks.

Step 1: Insert this into the <head> section of your page. Configure the images and corresponding links.

<script language="JavaScript1.1">

// Blending Image Slide Show Script-
// © Dynamic Drive (
// For full source code, visit

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=new Array("image1.gif","image2.gif","image3.gif")

//specify corresponding links
var slidelinks=new Array("","","")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder=new Image()

function gotoshow(){
if (newwindow)[whichlink])


Step 2: Insert the below into the <body> section of your page:

<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

<script language="JavaScript1.1">

var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
if (ie) document.images.slide.filters[0].play()
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0


<p align="center"><font face="arial" size="-2">This free script provided by<br>
<a href="">Dynamic Drive</a></font></p>

Go to Top