Reorder News Items

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 8, 2008   (RSS)

By Mohaukla - January 8, 2008

How do you reorder news items in the list view?

Is it possible to have them drag and drop as in the Sections Editor area?
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [Theo] Reorder News Items

By Mohaukla - January 8, 2008

Would it be possible to actually number each of the items (for now - until the drag and drop functionality is implemented) by adding a field that we could issue a number to and then use the "order by" option to set them up. I would need help figuring out, if it is possible.

Any idea when you might be able to implement that functionality? That would be a huge selling point for a lot of my clients.
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [justritedesign] Reorder News Items

By Theo - January 8, 2008

Would it be possible to actually number each of the items (for now - until the drag and drop functionality is implemented) by adding a field that we could issue a number to and then use the "order by" option to set them up. I would need help figuring out, if it is possible.

Absolutely!

1) Create a new text field for your news with the fieldname "orderPriority"
2) Set higher values for the ones with greater priority (i.e. the ones you want to show first) because you'll want to sort in descending order. If you sort low-to-high (ascending order), items with blank values for the field will be sorted first!
3) In your list viewer, set the orderBy option to this:
$options['orderBy'] = 'orderPriority+0 DESC, date DESC';
You'll probably also want to set this as your List Order field in the Section Editor, so that the news list in the program interface sorts the same way.


I don't have an ETA on drag-sort for records, but this should help you get by until then. Let me know if you need any further assistance with this!
Theo Wiersma