Skip to Content Skip to Menu

Hide some custom code in a profile based on the users (not viewers) usergroup

11 months 3 weeks ago #335522 by wintercorn
I've got a custom profile layout with some tabs for the content. Some tabs don't need to be displayed for certain levels of member and I can hide the output using CB. 

Can I hide the actual tab code from certain user profiles based on their usergroup or sub level?

Example with hacky html:

<tab item 1>
Visible to all members
</tab item 1>

<tab item 2>
Only visible on one type of profile
</tab item 2>

There isn't enough documentation for Conditionals for me to determine if this can help.

 

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
11 months 3 weeks ago #335525 by krileon
You'd use CB Conditional for that. Once installed and published navigate to CB > Tab Management and edit your tab. Then under Integrations > CB Conditional you can configure conditions for your tabs. The conditions UI is setup to be relatively self explanatory, but below is an example based off your usecase.

Display: Tab conditional show
Field: Usergroups
User: Displayed User
Operator: Has
Usergroups: SELECT_USERGROUPS_HERE
On: Profile View

Select the usergroups you want to have access to that tab and you're done. Using the "On" parameter this will only apply to profile view. Select other views if you want the condition to apply to them.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum