Skip to content

Commit

Permalink
the active flag is now also set for the categories of the active cate…
Browse files Browse the repository at this point in the history
…gory tree, as long as you are in a subcategory
  • Loading branch information
sschreier committed Oct 12, 2024
1 parent 9934782 commit 5754976
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sschreier/sschreierdropdownmenu",
"description": "Dropdown Menü",
"version": "1.2.0",
"version": "1.2.1",
"type": "shopware-platform-plugin",
"license": "proprietary",
"authors": [
Expand Down
Binary file modified src/Resources/config/plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{% block layout_main_navigation_menu_items_inner %}
{% set activePath = page.header.navigation.active.path %}

{% for treeItem in navigationTreeItem %}
{% set category = treeItem.category %}
{% set name = category.translated.name %}
Expand Down Expand Up @@ -70,7 +68,7 @@
{% block layout_main_navigation_menu_item_dropdown_menu %}
<div class="dropdown-menu dropdown-menu-level-{{ level }}{% if config('SschreierDropdownMenu.config.dropdownMenuAlwaysOpenToLeft') %} dropdown-menu-right{% endif %}{% block layout_main_navigation_menu_item_dropdown_menu_additional_cssclasses %}{% endblock %}">
{% block layout_main_navigation_menu_item_dropdown_menu_include %}
{% sw_include '@SschreierDropdownMenu/storefront/layout/navigation/navigation-menuitems.html.twig' with {navigationTreeItem: treeItem.children, level: level+1, pageHeaderNavigationActive: pageHeaderNavigationActive} only %}
{% sw_include '@SschreierDropdownMenu/storefront/layout/navigation/navigation-menuitems.html.twig' with {activePath: activePath, navigationTreeItem: treeItem.children, level: level+1, pageHeaderNavigationActive: pageHeaderNavigationActive} only %}
{% endblock %}
</div>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{% block layout_main_navigation_menu_items_dropdownmenu_before %}{% endblock %}

{% if config('SschreierDropdownMenu.config.dropdownMenuIsActive') %}
{% sw_include '@SschreierDropdownMenu/storefront/layout/navigation/navigation-menuitems.html.twig' with {navigationTreeItem: page.header.navigation.tree, level: 0, pageHeaderNavigationActive: page.header.navigation.active} only %}
{% sw_include '@SschreierDropdownMenu/storefront/layout/navigation/navigation-menuitems.html.twig' with {activePath: page.header.navigation.active.path, navigationTreeItem: page.header.navigation.tree, level: 0, pageHeaderNavigationActive: page.header.navigation.active} only %}
{% else %}
{{ parent() }}
{% endif %}
Expand Down

0 comments on commit 5754976

Please sign in to comment.