Create a new Menu named Hidden and set the menutype to "hidden".
Add a menu item to that menu.
Open a template style and check the menu associations tab.
A visible checkbox to associate the template style with the created menu item.
No checkbox visible. Reason for that is the menu alias will be added to the Input tag as a class - without any prefix. So it becomes input[type=checkbox].hidden which is a class used by bootstrap to hide stuff.
Issue is present in 3.9.5.
Labels |
Added:
?
|
Title |
|
Title |
|
Labels |
Added:
J3 Issue
|
Status | New | ⇒ | Confirmed |
If we add around https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_menus/models/menu.php#L216
if ($data['menutype'] == 'hidden')
{
$this->setError(JText::sprintf('COM_MENU_MENU_TYPE_FORBIDDEN', $data['menutype']));
return false;
}
and the lang string,
COM_MENU_MENU_TYPE_FORBIDDEN="The Menu Type \"%s\" is forbidden. Please use another Menu Type."
we can get:
I just wonder if there are other terms that should be forbidden.
@HLeithner
What do you think?
sounds wrong, why I'm not allowed to create a menu type "hidden" I think I created many of them.
The checkbox gets the menu name as class attribute and hidden has a special meaning. I'm not sure why the menu alias is in the class of the checkbox... maybe prefixing it or removing it...
Indeed. The code is
class="chk-menulink <?php echo $type->menutype; ?>"
But would not changing that break B/C?
I would prefix it with something like
class="chk-menulink <?php echo 'menutype-' . $type->menutype; ?>"
We need 3 prefixes then in code of edit_assignment.php
And because it's a bug that must be fixed I wouldn't care about B/C in this case.
Status | Confirmed | ⇒ | Discussion |
Or creating an override for the ISIS template for edit_assignment.php
with these changes.
is there even a need to have the menutype in the class name?
The menutype exists for the javascript to identify the checkbox and not for any styling. So that can easily and correctly be changed to a data- attribute instead.
As for b/c this is only in the admin ui AND rendered markup is not part of the B/C policy
OR the code could be written exactly the same as the selector in the module assignment
@brianteeman can you create a pr for this? I would suggest do the same as in module assignment
sorry i dont have time to do anything on j3
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-07-06 15:59:09 |
Closed_By | ⇒ | Quy |
Please test PR #25454.
Modified "Associations" to "Assignment" as these are different functions. ;)
I confirm the behavior.

Not much we can do imho. We "could" prevent using "hidden" as menu type, but are we sure it is the only Menu Type that we should not accept?