ExpressionEngine 2 中的动态导航
我是 expressionEngine 2 的新手,我面临着一个需要大量导航和子导航的网站。快速浏览后,似乎我必须将导航放入模板中,并且必须对其进行硬编码。
我发现的唯一方法是使用名为 NavEE 的模块,但对于创建的每个页面,我们仍然需要创建一个导航项。有没有办法根据创建的节点直接从模板生成导航。
谢谢。
I'm new to expressionEngine 2 and I'm facing a web site that needs a massive navigation and sub navigation. After having a quick look, it seems that I have to put the nav in template and it has to be hard coded.
The only way I've found was to use the module called NavEE but still, for every page created, we need to create a navigation item. Is there a way to generate the nav directly from the template based on the nodes created.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有几种方法可以做到这一点,但这主要取决于您如何设置频道。例如,如果您有一个名为“页面”的频道,您可以这样开始动态导航:
这应该会给您一个良好的基础动态导航。如果您想更进一步,您可以使用相关条目自定义字段并将其他条目(作为子页面)关联回该条目。
如果您确实要构建复杂的导航和结构,请考虑购买结构模块 - http://buildwithstruct.com/ 。如果您要这样做,则需要在构建网站时牢记结构。
There are a few ways to do this, but it mostly depends on how you're setting up your channels. For example, if you have a channel called 'pages' you could start your dynamic navigation this way:
That should give you a good base dynamic navigation. If you want to go further, you could use a related entries custom field and relate other entries (as subpages) back to the entry.
If you're really building out a complex navigation and structure, take a look at purchasing the Structure module - http://buildwithstructure.com/. You'll need to build your site with Structure in mind if you're going that way though.