? J4 Issue ?
avatar Scrabble96
Scrabble96
5 Sep 2019

Steps to reproduce the issue

Create a new front-end menu item and assign it to a parent item
Open the menu module and select 'Hide'

image

Save the module
View front end in browser and refresh the window

Expected result

No sub-menu

Actual result

Sub-menu displayed:

image

System information (as much as possible)

J4Alpha11 full package

Additional comments

avatar Scrabble96 Scrabble96 - open - 5 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Sep 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 5 Sep 2019
avatar Scrabble96 Scrabble96 - change - 5 Sep 2019
Title
[4.0] sub-menu items do not hide when 'show' in module is off
[4.0] sub-menu items do not hide when module 'sub-menu items' is 'Hide'
avatar Scrabble96 Scrabble96 - edited - 5 Sep 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Sep 2019

Issue confirmed.

avatar franz-wohlkoenig franz-wohlkoenig - edited - 5 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Sep 2019
Status New Confirmed
avatar Scrabble96
Scrabble96 - comment - 5 Sep 2019

Additional info:

If there are two main menu items, each with a child sub-menu item, then the sub-menu item displays for the page you are actually viewing, but not the other. I have now added a sub-menu item to the Home page (yes, this is now possible!):

image

If I switch to the Blog page, the view is the same as the first Mainmenu image above and the 'Home sub-menu' item disappears and the blog sub-menu reappears.

avatar Scrabble96
Scrabble96 - comment - 23 Sep 2019

Further comment: I noticed today that there is a class mod-list which is applied in the mod_menu but is undefined in the template css so it currently serves no purpose:

https://github.com/joomla/joomla-cms/blob/e10150012c5fa32f9a04d9fb4e9ba6483a56918f/modules/mod_menu/tmpl/default.php#L26
<ul<?php echo $id; ?> class="mod-menu nav<?php echo $class_sfx; ?> mod-list">
This file is, apart from the top few lines referencing the ModuleHelper and HTMLHelper is virtually identical to the same file in J3.10 Dev.

In J3.9 it's different, but still has the class mod-list and that isn't defined, either!

avatar Scrabble96 Scrabble96 - change - 25 Sep 2019
Title
[4.0] sub-menu items do not hide when module 'sub-menu items' is 'Hide'
[4.0] Cassiopeia sub-menu items do not hide when module 'sub-menu items' is 'Hide'
avatar Scrabble96 Scrabble96 - edited - 25 Sep 2019
avatar Scrabble96 Scrabble96 - change - 25 Sep 2019
The description was changed
avatar Scrabble96 Scrabble96 - edited - 25 Sep 2019
avatar Scrabble96
Scrabble96 - comment - 26 Sep 2019

Three further observations, if anyone is interested:

  1. With 'sub-menu items' set to 'Hide' it is not possible to view the child items of other parent items without first clicking/tapping on the parent item. Not good for SEO and rather tedious if there are several parents each with several child levels you need to click/tap through before finding the right place.

If 'sub-menu items' is set to 'Show' then you would see every item under every parent displayed, which could be a very long list.

What is needed is a drop-down system like the Admin menu, which I see is a plugin and not Joomla core code.

  1. the 'mod_menu/menu.min.js' file referenced in the menu's default.php seems to have no effect on the menu's display. Removing this line:
    HTMLHelper::_('script', 'mod_menu/menu.min.js', array('version' => 'auto', 'relative' => true));

has no apparent effect.

  1. As mentioned in a closed issue #21134 (comment) the menu (for desktop/large tablet view) should really be horizontal. Therefore, the css
    .mod-menu { flex-direction: column; }

should really be
.mod-menu { flex-direction: row; }

It was commented that it would be too hard work to change the core to accommodate a switch between horizontal and vertical, but there's already a switch between 'Show' and 'Hide' child items (even though it doesn't really work) referenced in the menu helper file:

https://github.com/joomla/joomla-cms/blob/4.0-dev/modules/mod_menu/Helper/MenuHelper.php

So I don't see any reason why new switch field could be added for horizontal/vertical choice and the mod_menu/default.php adjusted from this:

<ul<?php echo $id; ?> class="mod-menu nav<?php echo $class_sfx; ?> mod-list">

to something like this:
if ($newSwitchField==>'horizontal') {<ul<?php echo $id; ?> class="mod-menu-horizontal nav<?php echo $class_sfx; ?> mod-list">} else {<ul<?php echo $id; ?> class="mod-menu-vertical nav<?php echo $class_sfx; ?> mod-list">}

with mod-menu replaced with the two classes above.

avatar Formatio-hippocampi
Formatio-hippocampi - comment - 25 Sep 2020

need label "J4 Frontend Template"

avatar alikon alikon - change - 25 Sep 2020
Labels Added: ?
avatar alikon alikon - labeled - 25 Sep 2020
avatar drmenzelit
drmenzelit - comment - 18 Dec 2020

@Scrabble96 is this issue still present after the improvements done in Cassiopeia?

avatar Scrabble96
Scrabble96 - comment - 18 Dec 2020

No, it isn't, so I'll close this issue as being fixed.

avatar Scrabble96 Scrabble96 - close - 18 Dec 2020
avatar Scrabble96 Scrabble96 - change - 18 Dec 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-12-18 15:18:18
Closed_By Scrabble96
avatar drmenzelit
drmenzelit - comment - 18 Dec 2020

Thanks

Add a Comment

Login with GitHub to post a comment