Labels |
Added:
?
|
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
The only place where I see "Add New Shortcuts" parameter (shownew
field name) used is in
/administrator/modules/mod_menu/Menu/CssMenu.php
line 290
// Whether this scope can be displayed. Applies only to preset items. Db driven items should use un/published state.
if (($item->scope === 'help' && $this->params->get('showhelp', 1) == 0) || ($item->scope === 'edit' && !$this->params->get('shownew', 1)))
{
$parent->removeChild($item);
continue;
}
I have absolutely no idea of its usage.
It was used in j3. It does nothing in j4
Concerning showhelp, as it is only useful for the alternate preset I propose a modification of the xml by adding some showon
<field
name="showhelp"
type="radio"
label="MOD_MENU_FIELD_SHOWHELP"
class="switcher"
default="1"
filter="integer"
showon="preset:alternate[AND]menutype:*"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="forum_url"
type="url"
label="MOD_MENU_FIELD_FORUMURL_LABEL"
description="MOD_MENU_FIELD_FORUMURL_DESC"
filter="url"
size="30"
default=""
showon="showhelp:1[AND]menutype:*"
validate="url"
/>
What do you think?
At the same time we could get rid of the shownew field and its lang string.
Is Add New Shortcuts
for the +
icon in the menu? If yes, this option would be nice to have to hide/show.
It is not the case in j4. I think it was used to get the Add New Article
(and similar) in J3 (I am not on my desktop right now)
In J4 we get the + in the presets xmls with quicktask
. See my recent PR.
Switch to Joomla Main Menu. Custom Support Forum URL should not display.
Will test again the showon in my code above
In fact we can just modify CssMenu.php by adding the help link from the default preset to switch help also for Preset -Joomla Main Menu
elseif ($item->link === 'index.php?option=com_cpanel&view=help'
|| $item->link === 'index.php?option=com_cpanel&view=cpanel&dashboard=help')
{
if ($this->params->get('showhelp', 1))
{
continue;
}
// Exclude help menu item if set such in mod_menu
$parent->removeChild($item);
continue;
}
Will make patch.
Let's deal with shownew
, if possible to get that parameter where we need it, i.e when quicktask
is defined, for another patch.
The alternative is to decide if these options are really needed and therefore reduce the number of options in Joomla by simply removing them. Just because they were present in J3 doesnt mean they have to be in j4
The alternative is to decide if these options are really needed and therefore reduce the number of options in Joomla by simply removing them. Just because they were present in J3 doesnt mean they have to be in j4
Why not also get rid of all this dashboard confusing stuff with its multiple complex configurations?
Seriously: displaying or not the help and being able to add a custom forum url are useful.
I agree about the custom forum URL but why would you really want to hide the help,? You could always create a custom menu if it's needed.
Most options were introduced to avoid making a decision. This is why we have so many and such a complicated UI.
We should be brave and make decisions.
Concerning shownew
, I found a solution.
We can use
if ($current->getParams()->get('menu-quicktask', false) && $this->params->get('shownew', 1) === 1)
{
etc.
Note for myself
Show Help - now works correctly
will look at the other two later today
Only the custom help menu doesn't work now
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-23 22:18:34 |
Closed_By | ⇒ | brianteeman |
Switch to
Preset - Alternative Main Menu
. The last two options work.