Remove "Subcategories" tab from the user control panel.
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Apr 2023, 16:32
Remove "Subcategories" tab from the user control panel.
Hi, is it possible to disable and remove the "Subcategories" from the "user control panel".
I am aware that in the "Categories View" Options tab the "Display Subcategories" can be set to "No".
And that in the "Users" Options tab the "Maximal Count Of Subcategories" can be set to "0".
But still de "Subcatgories" tab appears in the "user control panel" on the front end.
For my usage and users I would like to hide the "Subcategories" tab from the user control panel.
Thanks for your advice.
I am aware that in the "Categories View" Options tab the "Display Subcategories" can be set to "No".
And that in the "Users" Options tab the "Maximal Count Of Subcategories" can be set to "0".
But still de "Subcatgories" tab appears in the "user control panel" on the front end.
For my usage and users I would like to hide the "Subcategories" tab from the user control panel.
Thanks for your advice.
Tags:
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Apr 2023, 16:32
Re: Remove or hide "Subcategories" tab from the user control panel.
In fact the software should be able to just hide the "Subcategories" tab from the user control panel once the "Maximal Count Of Subcategories" is set to "0".
What do you think?
What do you think?
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Remove "Subcategories" tab from the user control panel.
Hi,
More likely due to a template override.
Or try like this:
Code into your custom.css of your template:
Of course you will have a different #phTabId .... number than in the pattern above.
You can see this with inspector for inserting it in the code. Tried it temporarily on a test site and it works.
Kind regards
Christine
More likely due to a template override.
Or try like this:
Code into your custom.css of your template:
Code: Select all
a.phTabsA.phTabsHeader#phTabId6448efa6a6ca4Itemsubcategories {
display: none;
}
You can see this with inspector for inserting it in the code. Tried it temporarily on a test site and it works.
Kind regards
Christine
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Apr 2023, 16:32
Re: Remove "Subcategories" tab from the user control panel.
Thanks for your tip, but this seams not to work.
I tried to put a custom.css in the "Cassiopeia" template and in the Phoca Galley "Styles" with the code you adviced, but still the "Subcategories" tab is available in the user control pannel.
I also noticed that the value of #phTabId is changing when starting a new session.
Kind Regards,
Daniel.
I tried to put a custom.css in the "Cassiopeia" template and in the Phoca Galley "Styles" with the code you adviced, but still the "Subcategories" tab is available in the user control pannel.
I also noticed that the value of #phTabId is changing when starting a new session.
Kind Regards,
Daniel.
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Remove "Subcategories" tab from the user control panel.
Hi Daniel,
Therefore I think we need a template override, as supposed in previous Post & have to find the correct file.
Kind regards
Christine
In principle for Cassiopeia you should use a user.css.
The Code works, but you are right: Unfortunately the number of the #phTabld is changing.I also noticed that the value of #phTabId is changing when starting a new session.
Therefore I think we need a template override, as supposed in previous Post & have to find the correct file.
Kind regards
Christine
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Apr 2023, 16:32
Re: Remove "Subcategories" tab from the user control panel.
Thanks for your reply. I am looking forward for what file has to be changed to hide the subcategories tab from the uiers control panel.
Thanks and kind regards,
Daniel.
Thanks and kind regards,
Daniel.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Remove "Subcategories" tab from the user control panel.
Hi, CSS is even able to select items by class and order of it. So e.g. if the tab is second, you can access this item without need to include ID (which is changing):
https://www.w3schools.com/cssref/sel_nth-child.php
The tabs feature is made by two items (the tab folder and content, so both need to be hidden). And if there is Javascript (depends on Bootstrap version), maybe there can be some conflicts, so in such case only template override can help
Jan
https://www.w3schools.com/cssref/sel_nth-child.php
The tabs feature is made by two items (the tab folder and content, so both need to be hidden). And if there is Javascript (depends on Bootstrap version), maybe there can be some conflicts, so in such case only template override can help
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Remove "Subcategories" tab from the user control panel.
Hallo Jan,
could you please check, if following file/codes etc. could be correct?
Template override:
copy this file: /components/com_phocagallery/views/user/tmpl/default.php
to: /templates/your template/html/com_phocagallery/user/default.php
(You can also do this directly in backend under: Create overrides).
To delete or to comment it out:
line 79:
lines 93-95:
thanks, Christine
could you please check, if following file/codes etc. could be correct?
Template override:
copy this file: /components/com_phocagallery/views/user/tmpl/default.php
to: /templates/your template/html/com_phocagallery/user/default.php
(You can also do this directly in backend under: Create overrides).
To delete or to comment it out:
line 79:
Code: Select all
$tabItems[2] = array('id' => 'subcategories', 'title' => Text::_('COM_PHOCAGALLERY_SUBCATEGORIES'), 'image' => 'subcategories', 'icon' => 'category');
Code: Select all
echo $tabs->startTab('subcategories');
echo $this->loadTemplate('subcategories');
echo $tabs→endTab();
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Remove "Subcategories" tab from the user control panel.
Hi, yes, this should do the trick.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Apr 2023, 16:32
Re: Remove "Subcategories" tab from the user control panel.
Hi Christine Jan,
Thanks for the workaround, it works !!!!
I wonder if this override will still be there and be applicable after a Joomla and/or Phoca Gallery upgrade.
In my view the best solution is to improve (change reauest) Phoca Gallery to hide the "Subcategories" tab from the user control panel once the "Maximal Count Of Subcategories" is set to "0".
What do you think?
Thanks for your support and quick responses.
Kind Regards,
Danny.
Thanks for the workaround, it works !!!!
I wonder if this override will still be there and be applicable after a Joomla and/or Phoca Gallery upgrade.
In my view the best solution is to improve (change reauest) Phoca Gallery to hide the "Subcategories" tab from the user control panel once the "Maximal Count Of Subcategories" is set to "0".
What do you think?
Thanks for your support and quick responses.
Kind Regards,
Danny.