-
Notifications
You must be signed in to change notification settings - Fork 103
Setup
Ola Frankowska edited this page Nov 30, 2023
·
8 revisions
Run the following composer command:
composer require snowdog/module-menu
Run the following magento command:
bin/magento setup:upgrade
Demo: menu-hyva.snowdog.dev
- Snowdog Menu version
2.24.0
or later - Hyvä Theme version
1.3.0
or later
- Top menu mobile
- Top menu desktop
- Footer
You need to create them in admin. There are 2 ways to do this:
-
Import menus located in
imports
directory, then adjust them to your needs. The menus were created using Magento Sample Data. -
Create new menus with
identifier
:hyva-topmenu-desktop
hyva-topmenu-mobile
hyva-menu-footer
We don't provide CSS for menu templates for standard Magento. You can either add custom CSS or use themes, or extensions built on top of this module:
- Create a new menu
- Add the created menu to a layout (for example:
Magento_Theme/layout/default.xml
):
<block
name="block-name"
class="Snowdog\Menu\Block\Menu"
>
<arguments>
<argument name="menu" xsi:type="string">
menu-id
</argument>
</arguments>
</block>
- Replace:
-
block-name
with a descriptive name -
menu-id
with the identifier of the menu.
-
- Position the block inside another block (parent).
- Render the menu inside the parent block template:
<?= $block->getChildHtml('block-name') ?>