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

Problems with sortable tables


Reply


2 Posts   805 Views

Avatar
ThereBeDragonsHere

Community Member, 8 Posts

14 December 2010 at 2:50pm

Hello folks,

I am building an encyclopedic site which has sortable tables as a function and would like to keep this functionality after migrating my site to SilverStripe. However, I have noticed that the javascript code that I had been using does not work correctly in the CMS. This is what my page looks like in the CMS:

http://ren.cnwcentral.com/silverstripe/cargo/

As an experiment, I copied the source code of the entire page and made a separate html page. For some reason, the javascript works just fine in the test page but not in the CMS page.

http://ren.cnwcentral.com/silverstripe/themes/cunardclassic/templates/test.html

What can I do to get sortable tables? I had been looking through the forum archive and had seen this:

http://doc.silverstripe.org/tablelistfield#sorting

But I have to admit that I don't understand what it means. Where do I paste that information into? And what do I need to change in that text to make it apply to my table? Thanks!

Oh, and my template has a whole host of other problems, as evident from what you can see. Any help on resolving those would be great too.

Avatar
dompie

Community Member, 88 Posts

17 December 2010 at 8:39am

How did you build up your Table and how do you add new entries? Have you instanciated an xxTable class somewhere in source code?