1.我把菜单的内容存放入数据库,并且针对性的生成了html文件,方便读取.但问题出现了,我不知道怎么去匹配,例如,跳转到产品中心,生成了html文件,没法自动识别,这个时候要重新查询数据库,有没有其他更好的办法呢?
2.查询数据库去找相对应的菜单选项,但我怎么匹配到相对应的菜单呢?通过地址去判断?但这样会不会安全性很低呢?
create table `#db_prefix#menu` ( `list_id` int(11) null auto_increment, `menu_id` varchar(55) not null comment '菜单值', `sort_id` int(11) unsigned not null comment '排序id', `parent_id` varchar(55) null comment '父类值', `name` varchar(55) not null comment '菜单名称', `title` varchar(55) not null comment '菜单标题', `en` varchar(55) not null comment '英文菜单名称', `icon` varchar(55) null comment '图标 / ico', `url` varchar(55) null comment '菜单超链接', `default` varchar(255) null comment '默认值 / 超链接', `type` set('on', 'off') not null comment '审核', `published` int(11) unsigned not null comment '发布时间', primary key (`list_id`), key `menu_id` (`menu_id`), key `sort_id` (`sort_id`), key `parent_id` (`parent_id`))engine=#db_engine# default charset=#db_code#;
关于菜单和导航的设计,各位大神有什么其他建议吗?或者其他更好的办法吗?
回复内容: 这样的,开发网站导航和菜单的时候有这样的疑惑....
1.我把菜单的内容存放入数据库,并且针对性的生成了html文件,方便读取.但问题出现了,我不知道怎么去匹配,例如,跳转到产品中心,生成了html文件,没法自动识别,这个时候要重新查询数据库,有没有其他更好的办法呢?
2.查询数据库去找相对应的菜单选项,但我怎么匹配到相对应的菜单呢?通过地址去判断?但这样会不会安全性很低呢?
create table `#db_prefix#menu` ( `list_id` int(11) null auto_increment, `menu_id` varchar(55) not null comment '菜单值', `sort_id` int(11) unsigned not null comment '排序id', `parent_id` varchar(55) null comment '父类值', `name` varchar(55) not null comment '菜单名称', `title` varchar(55) not null comment '菜单标题', `en` varchar(55) not null comment '英文菜单名称', `icon` varchar(55) null comment '图标 / ico', `url` varchar(55) null comment '菜单超链接', `default` varchar(255) null comment '默认值 / 超链接', `type` set('on', 'off') not null comment '审核', `published` int(11) unsigned not null comment '发布时间', primary key (`list_id`), key `menu_id` (`menu_id`), key `sort_id` (`sort_id`), key `parent_id` (`parent_id`))engine=#db_engine# default charset=#db_code#;
关于菜单和导航的设计,各位大神有什么其他建议吗?或者其他更好的办法吗?
通过地址去菜单,但是可以以散列的方式存地址键
