From: WolfShade on
Hello, all.

I have a client who would like to have the ability to change the order in
which sub navigation items appear on their site.

I've got it to the point where if the SO is changed in the database, that
change is reflected on the site. But currently the change has to be manually
done via Enterprise Manager.

The next step is to set up the CMS so that the SO can be changed. I'm looking
into a javascript solution that displays all items in a select object
(size=number of records in recordset) and the items can be "dragged" to
whatever position in the list the user wants.

My ideas end, there. Any suggestions on how to pass that information to the
database for the update? Should I use an array? Where do you recommend I go,
from here?

Thanks,

^_^

From: Dan Bracuk on
You didn't mention how the user calls the page to start with. If you are using
a form, you can have "sort by" form fields and process them accordingly.

To change the sort order after the page has been loaded, you don't have to
pass anything back to the database. You can change the display using js. One
of my co-workers wrote a page where you can sort data in an html table by
clicking on the column header.



From: WolfShade on
Currently, the idea is that each top navigation item uses js to display all
sub-nav items associated with that top-nav, and at the top of the list of
sub-nav items is a link for changing the SO of those sub-nav items. When the
top-nav clicked is for, say, "About", then all sub-nav items (clickable for
editing) under the heading of "About" appear with a link at the top of the list
that says "Change Sort Order for: About"; when clicked this will open a page
that (ideally, if I can find the js for it) contains a select box that has a
size equal to the number of sub-nav items so there is no scrollbar, and
contains all sub-nav items in the current sort order from top to bottom; the js
allows the user to click-n-drag the items to the order they want them in, then
click a submit button to make the changes in the database.

So it will be more than just "click this header to sort data according to this
column" (which I'd use CF for that, not js). The client wants a customisable
sort order for the sub-nav items (first item = 1, second item = 2, etc.; change
the way the items appear on the public side pages.)

^_^