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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2006 Views

Avatar
Allisone

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.

Avatar
schellmax

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 http://doc.silverstripe.com/doku.php?id=complextablefield#todo ('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:
http://www.silverstripe.com/site-builders-forum/flat/80906
but i didn't really get it there...

Avatar
Allisone

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.