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.

General Questions /

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

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

Image sliders on demand?


Reply


4 Posts   1322 Views

Avatar
pivey

Community Member, 11 Posts

8 April 2011 at 9:26am

Hello,

i am new at SS, so please excuse any stupid questions.
So far i am very impressed what can be achieved with SilverStripe.
I am struggeling to find a proper solution how to place jQuery image sliders in various page types, without building seperate page types.

Along with that, i saw some very useful modules (DataObjectManager, Uploadify, ImageGallery etc..) which allow users to build a dedicated "gallery page"

However, this is not what i am looking for.

I would like to "embeed" sliders in any page type i want to... by giving the user the ability to use these easy image upload and manipulation modules.

Could you please point me to a proper approach?
This would probably also help me to understand how fields & sections of other pages can be displayed on others.

Avatar
pivey

Community Member, 11 Posts

8 April 2011 at 10:05am

well, yes.. the search function did bring me closer.
Is it something lie this? http://silverstripe.org/general-questions/show/4843

Basiclly i need to have 9 different sliders placed in my project.

Maybe a bit closer explaination:
I have a hotel chain with 8 different properties, each will have its own section with sub-pages

So, i will need to include a slider on:

index (home)
Hotel 1
Hotel 2
Hotel 3
...
Hotel 8

My problem here is that i am planning to have only 2 page types
1 x index (home) & 1 x hotel index (home)

but images to each sliders will be different.

My idea was that i provide user the ability to create 8 "gallery pages" (hidden from public) with the gallery module and then having this content pulled into each hotel section, where the slider should be nested.

Avatar
martimiz

Forum Moderator, 1106 Posts

8 April 2011 at 9:29pm

Edited: 08/04/2011 9:39pm

A flexible way could be something like this: create a simple 'Slide' DataObject that holds the necessary data for each slide. Then create a MySlider SiteTree Decorator that has_many Slide objects and a ComplexTableField (or DataObjectManager) to add slides.

You can now add the Decorator to any PageType you like. You might want to create a 'MySlider_Controller' decorator for the Page_controller as well to show slides based on the type of Slider you implement

http://doc.silverstripe.org/sapphire/en/reference/dataobjectdecorator

Avatar
pivey

Community Member, 11 Posts

13 April 2011 at 7:43am

Hi martimiz,

thank you for your post.
Very close to my needs, will study this approach closer.