bennoislost/easy-navigation

A simple module to customize your navigation menu

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 1

Type:magento-module

0.0.1 2015-10-26 21:30 UTC

This package is auto-updated.

Last update: 2024-04-20 01:58:44 UTC


README

Simple navigation styling and extra category attributes for Magento.

Installation

Composer

php composer.phar require bennoislost/easy-navigation

Then refresh Magento caches.

Usage

Select a catalog/category attribute for use

Add the following snippit to your modules config.xml inside the default node. Replace my_new_catalog_attr with the attribute code you wish to be displayed in your navigation.

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

Display a selected attribute

Copy the following templates to your design package / theme.

  • 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

You can now use the following snippet to return the catalog/category attribute value in your template.

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

Replace my_new_catalog_attr with your attribute code.

With blocks in Magento these can be extended and replaced :)

Support

If you have any issues with this extension, open an issue on GitHub (see URL above)

Contribution

Any contributions are highly appreciated. The best way to contribute code is to open a pull request on GitHub.

Developer

Ben McManus - @bennoislost

Licence

MIT

Copyright

(c) 2015 Ben McManus