2005/7/27, Jacob Kaplan-Moss <
ja...@jacobian.org>:
> Generally, we've just used the templates for site navigation; we've
> assumed that having good navigation is something so important that it
> should be handled by a designer and not a content producer. Still,
> that's a tenuous argument at best, and you're totally right that a
> hierarchical option for the admin would be quite cool.
Well, this is probably the simplest admin possible -- tree on the left
and wysiwyg editor on the right. Later on some tree "blocks" can be
linked to the navigation on the public site. But you are right, the
content producers are not very good navigation designers :/ I am still
looking for ideal concept of navigation editing in relation with
content. Typo3 has really advanced one, I think:
http://www.typo3.com/
>
> We've got some code floating around that does it for one particular
> object -- basically a hack for one particular client -- but maybe
> something can be adapted for any object... It's a cool idea, anyway.
I would love to hear what database design you (or other) use. It's
kind of PITA :-)
I finally decided to use this structure:
id
name
url (slug field :-)
parent_id
(+ other fields...)
When node is added / updated the slug field is re-created. Slug field
in this case contains the whole path up to top, i.e.:
/information/somepage/somesubpage/
When this url is requested, one database SELECT is needed to look up the page.
The biggest issue about UI is rearranging the nodes; I believe that
ideally it should be drag and drop. The closest solution I found is
this one:
http://tool-man.org/examples/
It does not allow (yet) dragging between lists. But this one does:
http://neb.net/playground/dragdrop/ The lists are not nested, but I
hope the same script with little tweaks should work for nested lists
too.. I didn't try it yet.
--
Ksenia