Skip to content

Commit

Permalink
Merge branch 'feature/101802' into test/stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarek Krupiński committed Aug 7, 2023
2 parents 295730d + 5a69385 commit 4b09480
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Changed
- Updated eslint version to `8.45.0` and `eslint-plugin-vue` to 9.15.1 (DEV-95002)
### Fixed
- Mobile nav sidebar (DEV-101802)
## [2.23.1] - 2023-07-28
### Fixed
- Fixed issue with closing } missing

## [2.23.0] - 2023-07-26
### Fixed
Expand Down
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Magento 2 Menu
[![Packagist](https://img.shields.io/packagist/v/snowdog/module-menu?style=for-the-badge)](https://packagist.org/packages/snowdog/module-menu)
[![Packagist](https://img.shields.io/packagist/dt/snowdog/module-menu?style=for-the-badge)](https://packagist.org/packages/snowdog/module-menu)
[![Packagist](https://img.shields.io/packagist/dm/snowdog/module-menu?style=for-the-badge)](https://packagist.org/packages/snowdog/module-menu)

# Magento 2 Menu
Provides powerful menu editor to replace category based menus in Magento 2.

## Setup
1. Create new menu in the admin area `Content > Elements > Menus`.
2. Add new block to the layout, using the same ID as in the admin area.
```xml
<block name="block-name" class="Snowdog\Menu\Block\Menu">
<arguments>
<argument name="menu" xsi:type="string">menu-id</argument>
</arguments>
</block>
```
3. Use created block in the template
```php
<?= $block->getChildHtml('block-name') ?>
```

### This module doesn't provide ready to use UI
Out of the box this module is not compatible with any theme, but in the same time you can use it with any theme, although you need to take care of the styling on your own.

You can use themes or extensions build on top of this module if you are looking for something taht works out of the box:
- [Snowdog Alpaca theme](https://github.com/SnowdogApps/magento2-alpaca-theme)
- [RedChamps Luma theme support](https://github.com/redchamps/snowdog-menu-luma-support)
- [Victor Seager's Luma theme support](https://github.com/vseager/magento2-snowdog-menu-luma)

## Docs
Please check [wiki](https://github.com/SnowdogApps/magento2-menu/wiki) for more.
**Magento 2 Menu** by [Snowdog](https://snow.dog) is a **powerful menu configurator** that empowers online merchants to create advanced menus, enhancing their customers' shopping experience and improving SEO.
This module serves as a feature-rich replacement for the category-based top navigation found in Magento and Adobe Commerce. However, it offers much more versatility by enabling the creation of menus for various purposes and store views.

![snowdog-magento-2-menu-admin-configuartio](https://github.com/SnowdogApps/magento2-menu/assets/49198312/102b4d2a-7d06-48a4-9f99-37a17faae0f7)


## Use Cases
Here are some scenarios where Snowdog's Menu can be effectively used:
* **Create Separate Header Menus for Mobile and Desktop:** Optimize navigation for customers on different devices by creating distinct header menus for mobile and desktop.
* **Create Footer Menu:** Improve the management of footer links.
* **Create Custom Menus for Specific Pages:** Whether you need to add somewhere a sidebar menu or change the header menu, Snowdog's module offers you the flexibility to create and customize menus for any page of a Magento store.

## Key Features
* **Flexible Content:** Add various types of elements to menus, such as links, images, and CMS blocks.
* **Product Catalog Integration:** Easily include links to categories and products in menus. Our handy tree selector makes it a breeze to pick the exact categories you want to showcase, or you can opt for category-based import to add a chunk of your catalog tree to the menu with a few clicks.
* **Drag and Drop Editor:** The module offers a user-friendly drag and drop editor, making it effortless to configure multi-level menus exactly how you envision them. Arrange and customize menu items with ease, without any coding knowledge.
* **Import, Export and Duplicate Capabilities:** Save time and effort. This feature enables seamless replication of menus across different instances and Magento stores. It also gives an option to duplicate menus for faster setup and customization.
* **Multiple Ways of Adding Menus to Frontend:** Easily add menus to your frontend using PHTML templates, or fetch the data from our REST and GraphQL APIs.

## Documentation
To learn more about Magento 2 Menu by Snowdog, go to [wiki](https://github.com/SnowdogApps/magento2-menu/wiki).

## Contributing
Contributions are welcome! If you find a bug, or have a feature request, feel free to open an issue or submit a pull request.

## Like this project?
We'd appreciate it if you leave a ⭐ or share it with the world ✨.
2 changes: 1 addition & 1 deletion view/frontend/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var config = {
map: {
'*': {
'menu': 'Snowdog_Menu/js/menu.babel'
'snowdogMenu': 'Snowdog_Menu/js/snowdog-menu.babel'
}
}
};
2 changes: 1 addition & 1 deletion view/frontend/templates/menu.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<nav
class="<?= $menuClass ?>"
data-mage-init='{"menu": {}}'
data-mage-init='{"snowdogMenu": {}}'
>
<ul class="<?= $menuClass ?>__list">
<?php foreach ($block->getNodes() as $node): ?>
Expand Down
1 change: 1 addition & 0 deletions view/frontend/templates/menu/node_type/cms_page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if ($block->getIsViewAllLink()) {
if ($nodeId) {
$dataAttribute = ' data-menu="menu-' . $nodeId . '"';
}
}
?>

<a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define([], function () {
'use strict';

class Menu {
class SnowdogMenu {
constructor(element) {
this.menu = element;
this.links = this.menu.querySelectorAll('a');
Expand All @@ -22,6 +22,6 @@ define([], function () {
}

return function (config, element) {
new Menu(element);
new SnowdogMenu(element);
};
});

0 comments on commit 4b09480

Please sign in to comment.