Skip to content
Ola Frankowska edited this page Nov 30, 2023 · 8 revisions

Composer installation

Run the following composer command:

composer require snowdog/module-menu

Setup the module

Run the following magento command:

bin/magento setup:upgrade

Menu setup for Hyvä

Demo: menu-hyva.snowdog.dev

Requirements

  • Snowdog Menu version 2.24.0 or later
  • Hyvä Theme version 1.3.0 or later

We provide 3 ready to use menus

  • Top menu mobile
  • Top menu desktop
  • Footer

To display menus on frontend

You need to create them in admin. There are 2 ways to do this:

  1. Import menus located in imports directory, then adjust them to your needs. The menus were created using Magento Sample Data.
  2. Create new menus with identifier:
    1. hyva-topmenu-desktop
    2. hyva-topmenu-mobile
    3. hyva-menu-footer

Menu setup for standard Magento

Important note about styling

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:

To display a menu on frontend

  1. Create a new menu
  2. 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).
  1. Render the menu inside the parent block template:
<?= $block->getChildHtml('block-name') ?>