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.

All other Modules /

Discuss all other Modules here.

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

Where is the sortabledataobject Module


Go to End


8 Posts   1454 Views

Avatar
patjnr

Community Member, 102 Posts

6 June 2010 at 6:37am

Hi

does anyone have any idea why i can download the sortabledataobject module being talked about here.
http://doc.silverstripe.org/modules:sortabledataobject

i really need to use it.

thx

P

Avatar
UncleCheese

Forum Moderator, 4102 Posts

6 June 2010 at 7:10am

It's part of the DataObjectManager package.

Avatar
patjnr

Community Member, 102 Posts

6 June 2010 at 7:22am

Hi UC

the thing is i tries following the tutorial step by step using 2.4 but i get an error say these classes doesnt exist.

<?php
 
Object::add_extension('ComponentSet','SortableDataObjectSet');
Object::add_extension('DataObjectSet','SortableDataObjectSet');
Object::add_extension('Page_Controller','SortableController');

i want to implement front-end sorting

thx

P

Avatar
UncleCheese

Forum Moderator, 4102 Posts

6 June 2010 at 7:40am

Oh, sheesh.. that hasn't existed in like 2 years. I should remove that documentation. That whole adventure was a really bad idea. Data should be sorted in the backend.

Avatar
patjnr

Community Member, 102 Posts

6 June 2010 at 8:30am

Hi

Well said!
was just trying to be too ambitious I know DOM sorts very well and let me use that.

thanks for your time UC

regards

PJ

Avatar
UncleCheese

Forum Moderator, 4102 Posts

6 June 2010 at 1:15pm

Sure, no problem.. It's funny, I was just thinking, in the 2 years that's been gone, I think you're the only one to have ever asked about it, so I think it was probably a good move. :)

Avatar
patjnr

Community Member, 102 Posts

6 June 2010 at 8:59pm

Sure man I think it was a good move but did it ever work?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

7 June 2010 at 3:25am

Yeah, it worked great, but the big hurdle was that I wanted to make it easy for people to write the sortable markup structure without having to remember all the specific classnames and attributes that were required, so I made up these new template tags like:

$_BeginSortableUL
<% control SomeSortableItems %>
$LI sortable data $_LI
<% end_control %>
$_EndSortableUL

Which, of course, really blurred the lines of the MVC pattern, and was ultimately, just.. gimmicky, I guess.