Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用嵌套集来管理网站的导航。有一个单一的页面模型并让父名称定义站点的各个部分会更好,还是有一个可以嵌套的类别模型和一个单独的页面模型,每个模型都属于一个类别会更好?
任何建议表示赞赏。谢谢。
我认为 NestedSet 中的集合非常适合定义页面的结构(即构建导航等)。如果您发现需要对页面进行分类,您可以使用另一个 NestedSet 来存储该结构。