使用 XML 文件进行 Zend 导航
<configdata>
<home>
<label>Home</label>
<controller>dashboard</controller>
<action>index</action>
</home>
<accounts>
<label>Accounts</label>
<controller>accounts</controller>
<action>index</action>
<pages>
<sales>
<label>Sales Accounts</label>
<controller>sale</controller>
<action>index</action>
</sales>
<purchase>
<label>Purchase Accounts</label>
<controller>purchase</controller>
<action>index</action>
</purchase>
</pages>
</accounts>
</configdata>
我有类似上面的代码。我需要为 Accounts 标签后生成的 ul 标签添加一个类。像下面这样的东西是行不通的:
<pages class="sub">
<sales>
........
</sales>
</pages>
我的目的是有一个用于导航的大型菜单。要向其添加功能,我需要在生成的菜单代码中包含类。
<configdata>
<home>
<label>Home</label>
<controller>dashboard</controller>
<action>index</action>
</home>
<accounts>
<label>Accounts</label>
<controller>accounts</controller>
<action>index</action>
<pages>
<sales>
<label>Sales Accounts</label>
<controller>sale</controller>
<action>index</action>
</sales>
<purchase>
<label>Purchase Accounts</label>
<controller>purchase</controller>
<action>index</action>
</purchase>
</pages>
</accounts>
</configdata>
I have code something like the above. I need to add a class for the ul tag generated after the Accounts label. Something like the following doesn't work:
<pages class="sub">
<sales>
........
</sales>
</pages>
My purpose is to have a mega menu for the navigation. To add functionality to it I need to have classes within the generated menu code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将 class 元素添加到您的 xml 导航文件中,如下所示
Just add the class element to your xml navigation file like this