shopware - 使用插件 Shopware 在菜单中自定义项目
问题描述
请告诉我如何使用插件在前端添加菜单项?我沿着路径视图/前端/索引/main-navigation.tpl添加了一个带有新菜单项的模板。但是菜单项只出现在插件创建的页面上,而不是整个站点上。
解决方案
这是主菜单所在的位置:
├── frontend
│ └── index
│ └── shop-navigation.tpl
您可以覆盖其内容或只是附加到它。以下是文件内容的外观:
{extends file="parent:frontend/index/shop-navigation.tpl"}
{block name='frontend_index_checkout_actions'}
<li class="navigation--entry">
<a href="" class="btn starButton"> {* Add an URL to the href attribute to make your link work *}
<i class="icon--star"></i>
</a>
</li>
{$smarty.block.parent}
{/block}
推荐阅读
- python - Python Pillow 打开 8 位的 1 位深度文件
- mysql - 将单个文本列拆分为所有可能组合的两列
- reactjs - 扩展material-ui SpeedDial组件
- android-studio - 如何在没有控制台窗口的情况下从 .bat 运行 AVD 模拟器?
- java - 打印简单 K 均值集群中实例的数量(计数)或百分比
- vue.js - 查看js,没有冻结ui的v-text-field的侦听器
- android - 如何获取当前的经纬度并在吐司中显示?
- html - H3标签中的嵌套换行符
- python-3.x - 网络 X 删除具有一条边的节点
- vue.js - 在 VueJs 项目中导入和使用 npm 包