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, Ed, biapar, Willr, Ingo, swaiba

Content regions into JQuery Accordion

Go to End

4 Posts   2386 Views


Community Member, 28 Posts

11 September 2009 at 11:33am

Edited: 09/03/2010 6:13pm


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:

Can anyone point me in the right direction?


Community Member, 545 Posts

11 September 2009 at 5:13pm

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


Community Member, 33 Posts

11 September 2009 at 8:44pm

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>
<h4>DOM field 2</h4>
DOM field 3 with accordion panel content
%end control loop%


Community Member, 28 Posts

14 September 2009 at 11:02am

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