Hide a tab according to user level |
Post Reply ![]() |
Author | |
djju1029 ![]() Senior Member ![]() ![]() Joined: Aug 02 2016 Location: the US Status: Offline Points: 126 |
![]() ![]() ![]() ![]() ![]() Posted: Jan 13 2017 at 4:53pm |
Hi! OE Team,
Another question for user level. I want to implement to hide a some tab according to user level. For example, my web is composed by 3 main tab page: Summary, System, and Advance. I want to hide the Advance tab when basic user (level 1) is logged in. Currently, I use "#50-Protect a page (for any page)" to ban basic user to access this page, but it is still displayed. I want to protect this page not to show to basic user fundamentally. Could you let me know how to solve this concern? Thank you so much! DJ
|
|
![]() |
|
Dmit OE ![]() Admin Group ![]() Joined: May 31 2012 Status: Offline Points: 5283 |
![]() ![]() ![]() ![]() ![]() |
Hi again.
If I understand correctly, you want to hide a button/link leading to a restricted page. Well it's exactly the same technique as in here http://forum.openelement.com/en/forum_posts.asp?TID=939&PID=4439&title=coloring-user-name-according-to-level#4439 Put a Custom Class onto the element-tab, e.g. "hide-basic", then when you get the level: if (level <= 1) $('.hide-basic').hide().css('visibility', 'hidden'); |
|
![]() |
|
djju1029 ![]() Senior Member ![]() ![]() Joined: Aug 02 2016 Location: the US Status: Offline Points: 126 |
![]() ![]() ![]() ![]() ![]() |
It works. Thank you.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |