BullGuard Antivirus Sale - 60% Off with openElement !
Forum openElement Homepage
Forum Home Forum Home >

openElement

> Dynamic OE - Databases, etc
  New Posts New Posts RSS Feed - Hide a tab according to user level
  FAQ FAQ  Forum Search   Register Register  Login Login

Hide a tab according to user level

 Post Reply Post Reply
Author
Message
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Topic: Hide a tab according to user level
    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
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post 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

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');
Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: Jan 16 2017 at 4:01pm
It works. Thank you.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.11
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0,031 seconds.