bennoislost/easy-navigation

一个用于自定义导航菜单的简单模块

安装: 15

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 1

类型:magento-module

0.0.1 2015-10-26 21:30 UTC

This package is auto-updated.

Last update: 2024-09-20 03:02:51 UTC


README

为 Magento 提供简单的导航样式和额外分类属性。

安装

Composer

php composer.phar require bennoislost/easy-navigation

然后刷新 Magento 缓存。

用法

选择一个 catalog/category 属性进行使用

将以下代码片段添加到模块的 config.xml 文件中,位于 default 节点下。将 my_new_catalog_attr 替换为你希望在导航中显示的属性代码。

<frontend>
    <category>
        <collection>
            <attributes>
                <my_new_catalog_attr/>
            </attributes>
        </collection>
    </category>
</frontend>

显示选定的属性

将以下模板复制到你的设计包/主题。

  • app/design/frontend/base/default/template/bennoislost/easy-navigation/single-level.phtml
  • app/design/frontend/base/default/template/bennoislost/easy-navigation/level-with-children.phtml

你现在可以使用以下代码片段在模板中返回 catalog/category 属性值。

$this->getMenu()->getCategoryData()->getData('my_new_catalog_attr');

my_new_catalog_attr 替换为你的属性代码。

在 Magento 中,这些可以通过块扩展和替换 :)

支持

如果你对这个扩展有任何问题,请在 GitHub 上创建一个问题(见上方链接)

贡献

任何贡献都将受到高度赞赏。最好的贡献代码的方式是向 GitHub 提交一个 pull request

开发者

Ben McManus - @bennoislost

许可证

MIT

版权

(c) 2015 Ben McManus