Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Content regions into JQuery Accordion

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: 2050 Views
  • Greg1
    Avatar
    Community Member
    28 Posts

    Content regions into JQuery Accordion Link to this post

    Hi,

    I am using JQuery Accordion to display some content on my site. Currently I am just placing the required code in the HTML tab of the WYSIWYG editor and it is working ok. But, I would like to create a content region for each section of the accordion so that I don't need to put code into the editor. I'd prefer not to create a new page for each piece of content and there is no fixed number of sections in the Accordion.

    You can see it on my site: http://www.travel-insurance-reviews.com/1cover-travel-insurance/

    Can anyone point me in the right direction?

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Content regions into JQuery Accordion Link to this post

    Well you could always use the DataObjectManager Module. It'll let you create complex dataobjects that aren't pages

  • lawless
    Avatar
    Community Member
    33 Posts

    Re: Content regions into JQuery Accordion Link to this post

    The DataObjectManager seems like a good idea for this purpose.

    You would create fields for each of the areas in your accordions and then just use a %control% to loop through the DOM and display each accordion menu.

    Example using your code structure:

    %control loop%
    <h3><a href="http://#">DOM field 1</a></h3>
    <div>
    <h4>DOM field 2</h4>
    DOM field 3 with accordion panel content
    </div>
    %end control loop%

  • Greg1
    Avatar
    Community Member
    28 Posts

    Re: Content regions into JQuery Accordion Link to this post

    Thank you for the help. I'll check out DataObjectManager.

    2050 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.