Jump to:

23001 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Image sliders on demand?

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

Page: 1
Go to End
Author Topic: 1228 Views
  • pivey
    Avatar
    Community Member
    11 Posts

    Image sliders on demand? Link to this post

    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.

  • pivey
    Avatar
    Community Member
    11 Posts

    Re: Image sliders on demand? Link to this post

    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.

  • martimiz
    Avatar
    Forum Moderator
    1038 Posts

    Re: Image sliders on demand? Link to this post

    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

  • pivey
    Avatar
    Community Member
    11 Posts

    Re: Image sliders on demand? Link to this post

    Hi martimiz,

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

    1228 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.