Categories and DragSortOrder

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 3, 2012   (RSS)

Re: [Perchpole] Categories and DragSortOrder

By (Deleted User) - April 3, 2012

Hi Perchpole,

Unfortunately in order for the Category structure to work, the records have to remain nested in their respective category/sub-category.

When adding a new record, you can set which category/sub-category the new record belongs to which can eliminate some of the frustration, however after that it's just a case of bumping one step at a time.

The other alternative is to create a new multi-record view and add new records to it instead. Adding a field for 'category' through 'Section Editors'->'{table}'->{Add list} using the pulldown/get options from database then choose the categories table with 'num' as the stored value and 'name' as the list value will then enable you to assign category/sub-category to the record and you'll still be able to use dragSortOrder to re-arrange the records relative to each other.

When retrieving the records, you'll have to getCategories and then getRecords for the category selected, then loop over the returned getRecords when outputting in order to maintain the dragSortOrder arrangement.

Of course, that's not exactly a simple solution, but it is perhaps a good idea to implement it now so that it's easier for the future.

Let me know if this helps,

Tom