您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

thinkPHP网站导航,菜单设计疑惑?

2024/4/26 22:30:43发布14次查看
这样的,开发网站导航和菜单的时候有这样的疑惑....
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#;

关于菜单和导航的设计,各位大神有什么其他建议吗?或者其他更好的办法吗?
通过地址去菜单,但是可以以散列的方式存地址键
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product