使用nestedset进行站点导航

发布于 2024-08-17 15:47:39 字数 116 浏览 3 评论 0原文

我想使用嵌套集来管理网站的导航。拥有一个单页面模型并让父名称定义站点的各个部分会更好吗?或者拥有一个可以嵌套的类别模型和一个单独的页面模型(每个模型都属于一个类别)会更好吗?

任何建议表示赞赏。 谢谢。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

就此别过 2024-08-24 15:47:39

我认为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文