使用nestedset进行站点导航
我想使用嵌套集来管理网站的导航。拥有一个单页面模型并让父名称定义站点的各个部分会更好吗?或者拥有一个可以嵌套的类别模型和一个单独的页面模型(每个模型都属于一个类别)会更好吗?
任何建议表示赞赏。 谢谢。
I would like to use a nested set to manage the navigation of a website. Would it be better to have a single page model and just make the parent names define the sections of the site or would it be better to have a category model which can be nested and a separate page model, each of which belong to a category?
Any advice appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 NestedSet 中的集合非常适合定义页面的结构(即构建导航等)。如果您发现需要对页面进行分类,则可以使用另一个 NestedSet 来存储该结构。
I think that the sets in NestedSet are well suited for defining the structure of your pages (ie. building navigation and such). If you find that you have the need to categorize your pages, you can use another NestedSet to store that structure.