Hi everyone, using CSS or any other method, has anyone been able to make a menu item invisible without changing the user rights? I need this to use an info page as a landing page only without it being visible on the menu. I tried several options using the app settings, menu structure, menu configuration, the only for a menu item not to be visible to the user is to remove their rights. I need them to have the rights but not see it on the menu (except for the admin).
Any ideas? Thank you.
Make a menu item invisible?
Re: Make a menu item invisible?
Yes
viewtopic.php?t=4502
Can you give me the info from tag in the menu (from page source code).
viewtopic.php?t=4502
So you want it hidden but not for admin ?To hide entity you don't want to show (like an entity you already have in a report, like Kanban)
Can you give me the info from tag in the menu (from page source code).
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Re: Make a menu item invisible?
Yes, I want it hidden but not for admin.
I just sent you a private message with the code, I hope that is the right one.
Thank you very much.
I just sent you a private message with the code, I hope that is the right one.
Thank you very much.
Re: Make a menu item invisible?
Perfect, in your case :
Just for admin, unfortunately, you can't add PHP in custom html.
Maybe you can hide this page in the menu (with custom HTML), and for admin add in Application Structure, Menu configuration, Add menu section with a Url type, and access to admins only.
At this time, I don't know another workaround, sorry.
Perhaps by modifying the php files.
For all users, you need to add code in a tag script "<script>CODE HERE</script>" :- You can add this JS in Configuration, Custom HTML, Add code before tag </body>.
- Remember JS can be access with source of the page, so don't use confidential or privacy datas
Code: Select all
$('ul.sub-menu a.menu-extipagesview3').hide(); //3 is the id of information page IF in a sub-menu, IF not delete "ul.sub-menu" part
Maybe you can hide this page in the menu (with custom HTML), and for admin add in Application Structure, Menu configuration, Add menu section with a Url type, and access to admins only.
At this time, I don't know another workaround, sorry.
Perhaps by modifying the php files.
Last edited by Didou12 on 03 Jan 2024, 23:43, edited 1 time in total.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Re: Make a menu item invisible?
Thank you, but unfortunately this did not work. Here is a screenshot of where I put it. Hope I did it correctly.
...../index.php?module=ext/ipages/view&id=3
If this works, I can try a workaround as you suggested in your post. Thanks again.
Also fyi, this is the url of the menu item that I am trying to hide. ...../index.php?module=ext/ipages/view&id=3
If this works, I can try a workaround as you suggested in your post. Thanks again.
Re: Make a menu item invisible?
why are you use User HTMl, if maybe use User CSS?
Re: Make a menu item invisible?
Nruslan2 : Yes sometimes, but with DOM manipulation in the menu, CSS doesn't work, or maybe you have a workaround ? I tried several options and it doesn't work. Maybe how custom.css is loaded before others css for the menu.
Techtr : it works on my computer, it's JS so be sure to force the refresh of the page or to clean your browser, and tell me
Techtr : it works on my computer, it's JS so be sure to force the refresh of the page or to clean your browser, and tell me
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Re: Make a menu item invisible?
Hi Didou12, I force refreshed pages, cleaned cache, tried on different browsers but unfortunately it is not working. Thank you.
Re: Make a menu item invisible?
Very weird. Can you provide me the source (in text) of the whole sidebar in PM ? (Normally there is a comment before and after the sidebar in the html code). Thanks.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Re: Make a menu item invisible?
I just did. Thanks again.