Print Page | Close Window

Hide a tab according to user level

Printed From: openElement Website
Category:

openElement


Forum Name: Dynamic OE - Databases, etc
Forum Description: openElement's database management system and Element Packs
URL: https://forums.openelement.uk/en/forum_posts.asp?TID=940
Printed Date: Dec 08 2022 at 6:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hide a tab according to user level
Posted By: djju1029
Subject: Hide a tab according to user level
Date 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



Replies:
Posted By: Dmit OE
Date Posted: Jan 14 2017 at 11:44am
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" rel="nofollow - 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');


Posted By: djju1029
Date Posted: Jan 16 2017 at 4:01pm
It works. Thank you.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net