I'm working on a centralized site navigation data model that works on the default-master. The same data model is used from an index.vuh file to catch not-found errors and to provide 'virtual navigation'.
In the default-master, I generate top level and second level tabs. I was also hoping that If I could maybe generate a context bar without the need to create and maintain this information on each page of a site. The basic data model is like this:
create table un_nav_types (
type_id integer
not null
primary key,
type varchar(64)
not null
unique
);
create table un_nav_nodes (
node_id varchar(1024)
constraint nav_node_id_nn not null
constraint nav_node_id_pk primary key,
parent_node varchar(1024)
constraint nav_parent_node_fk references un_nav_nodes(node_id),
-- for multiple child nodes, you need order.
node_order integer
constraint nav_node_order_df default '0',
type_id integer
constraint nav_type_id_nn not null
constraint nav_type_id_df default '1'
constraint nav_type_id_fk references un_nav_types,
link_text varchar(1024)
constraint nav_link_text_nn not null,
title varchar(1024)
);
I need to make changes, for one title interfers with the page title, and this is used more in an alt text type of way, not as a page title. I was wishing there could be a global order placed on the nodes, which would include leaf nodes, so that you could construct navigation from subject to subject as well as within a subject. I guess maybe tree_sortkey type stuff would help with this. Maybe a description field would be helpful for more extended information?
Also, in the index.vuh file, I catch the closest matching point in the hirearchy. If this is different than the requested url it means that the user is url hacking, or tried to get a page that doesn't exist. I wanted to provide the closest match to the user, plus all the children of that node.
One problem with this is that the user is happy, but if the admin removes a page, they don't really want it to be indexed by search engines anymore. The current templating system doesn't allow anything other than a 200 status to be sent.
I made changes, and added some procedures to allow the developer to change the status. I also added a procedure to allow update of the mime-type for the template.
Example pages:
Top Level Navigation
Second Level Navigation
Virtual Navigation
Not Found Navigation
Any chance the core changes would be useful to anyone else?