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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Simple Javascript Image/Banner Rotator


Go to End


11 Posts   4863 Views

Avatar
Pix

Community Member, 158 Posts

8 October 2011 at 12:28pm

Hi!

I'm sure there must be something like this, or a SilverStripe tutorial, but I can't find it. What I would like to do is have a custom page that has a Javascript image/banner rotator. I am very comfortable with extending a basic site as outlined in the SS tutorial, but this one is has got me stumped. For instance, I can see how you add a photo or banner to a custom page, but how would you add multiple photos and then call one of the various javascript image galleries out there to rotate through them? Can anyone point me in the right direction? Perhaps there is a tutorial or module for this already?

Thank you!

Avatar
Felicitas

Community Member, 16 Posts

9 October 2011 at 3:01am

Hi,

I made a simple imagerotator module for my work to rotate logo's on any page they want. It lets you create a RotatorPage where you can add logo's (or other images). The actual RotatorPage with the rotating images is invisible in the menu, but you can show the rotating images in an iframe in any other page. See the README file in this module.

Avatar
Pix

Community Member, 158 Posts

9 October 2011 at 1:09pm

Alright! Thanks for sharing this I will give it a go!

Avatar
mhdesign

Community Member, 216 Posts

19 October 2011 at 3:18pm

Just gave this module a go but got a Fatal Error first time round...

Fatal error: Class 'DataObjectManager' not found in /User/Sites/dev/imagerotator/code/RotatorPage.php on line 35

Any clues?

Avatar
Howard

Community Member, 215 Posts

19 October 2011 at 4:17pm

arthurdent, have you got the DataObjectManager module installed? Looks like it needs to be.

Felicitas you might want to make a note of that in the README or else have the module fall back to a ComplexTableField if they don't have DOM installed.

Avatar
mhdesign

Community Member, 216 Posts

19 October 2011 at 5:53pm

Thanks for the pointer Howard! You've helped me out a few times lately which is much appreciated. I'm a graphic designer by trade, I can also do HTML and CSS and incorporate theim int a SilverStripe theme but PHP is still a little outside my scope!!

thanks again!

Avatar
Howard

Community Member, 215 Posts

19 October 2011 at 6:14pm

No worries glad I could help :)

There's no need to get heavily into the PHP but once you realise how easy it can be to add extra fields to pages on your site then they become really useful and addictive.

Avatar
mhdesign

Community Member, 216 Posts

19 October 2011 at 8:31pm

Still not out of the woods yet...

Things got so heavy I eventually had to trash my test install and DB and start again! Once up and running I loaded DataObjectManager (dev/build/) and them Imagerotator (dev/build/). It was all looking pretty froody until I went to set up the Rotator page...

Then it had a Javascript error, threw a bit of a hissyfit and went into a spin (1 error, 2 errors, etc..)

Any more words of advice -- or should I give up and do this in Flash?!

Go to Top