Create a new front-end menu item and assign it to a parent item
Open the menu module and select 'Hide'
Save the module
View front end in browser and refresh the window
No sub-menu
Sub-menu displayed:
J4Alpha11 full package
Labels |
Added:
?
|
Labels |
Added:
J4 Issue
|
Title |
|
Status | New | ⇒ | Confirmed |
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!):
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.
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!
Title |
|
Three further observations, if anyone is interested:
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.
has no apparent effect.
.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:
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.
need label "J4 Frontend Template"
Labels |
Added:
?
|
@Scrabble96 is this issue still present after the improvements done in Cassiopeia?
No, it isn't, so I'll close this issue as being fixed.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-18 15:18:18 |
Closed_By | ⇒ | Scrabble96 |
Thanks
Issue confirmed.