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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

SummaryPage with Pages (many to many). Control the order - how ?

Go to End

3 Posts   1644 Views


Community Member, 27 Posts

6 December 2008 at 6:22pm

I want to have a Pagetype where I can add already existing pages.
As many as I want. Also a page can be in several different SummaryPages. Thus many-to-many relation.

And I want to have a nice way of setting the order.

The coolest way would be if I could just drag the pages into order.
Like you can do with the inputs in a user defined form.

Is there a nice and easy way(class, etc.) to realize this dragging ? I'm considering studying the userdefinedform module. But I'd prefer not to (don't have much time)

Or does someone know some concrete files, api sections, etc. , that could enlighten me ??

PS: Only a few days since I know and work with silverstripe.


Community Member, 126 Posts

8 December 2008 at 11:36pm

i was having the same trouble and couldn't find any solution for this in the forum.
the docs say it's a TODO (but they don't mention a release version for this?)
see ('Ajax-Sorting')

sometimes it's a way to have the sortable objects in the sitetree, as drag'n'drop sorting is possible there, but that might not be applicable for your scenario

in case you're willing to code it by yourself there might be some hints in this thread:
but i didn't really get it there...


Community Member, 27 Posts

9 December 2008 at 4:03am

Thanks for the answer :D, actually the "sortable objects in the sitetree" has already become a solution strategy for me.
This way I get the Drag and Drop and the possibility to decide the ordering.
Also I can immidiatly see, where the pages are.

Only thing was, I had to make my own virtual page, but this wasn't that hard. So my SummaryPages can have many pages. And the pages can belong to many SummaryPages. Thus I also got my many-many relation, too.