I am creating dynamic navigation on the site. So I have a series of records
that build the navigation as well as the site (I am creating a cheesy overly
simple for my own use only CMS). So when I create a new page, the
information is automatically entered into the databse thus creating the site
pages/navigation/breadcrumb nav. So if I have a parent page called
Departments, and under it I have Transportation, Transportation will show up
under Departments as a child page (has a dash on the left to indent it and
show it is a child). I want all of the parent pages to sort in a certain
order, and if there is a child page, it automatically goes under that
parent. If I sort the query by ID, I get the proper order, but if a child
page has a record ID of 20 and it's parent is record ID 15, the child page
goes under record ID 19 instead of it's parent of 15. If I sort by the
hiearchy field, then the parent/child relationship works fine, but the
sorting of the parents is off.
So I am now thinking of putting a sort order in there and when I create a
page, I have a select list that I pick the order it is supposed to go in,
but that is going to be messy since pages can be added after the site is
done. So if I have a new child page that falls under the parent with an ID
of say 30, and there are 55 pages, the ID of the new page is going to be 56,
and even though I have a field called parentID and it would have 30 in it, I
would have to do a lot of shuffling around of the sort order.

Hopefully this makes sense?



Bruce


On 8/6/07, Peter Boughton wrote:
>
> I'm not sure I understand you, but eitherway it sounds over-complicated.
>
> Is there a reason you can't simply create a numerical field to use for
> ordering, and update the values of that to get things in the right
> position?
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2901
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to