Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

[SOLVED] Display Tab, conditionnal by a Tab

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 9 months ago - 6 years 9 months ago #301981 by chanteur94
Hi,

I explain my problem :

When I display a profile, I have 2 tabs. For exemple Tab1 for personal information and Tab2 for professional infomation.

I create a menu with 2 buttons who display the profile : one button with direct access to Tab1 and one button with direct access Tab2.

In the two case, the 2 tabs are displayed (Tab1 and Tab2).

I would like to display ONLY the tab that I choose by the menu button.

In Cb conditionnal, there is no case depending on tab selected.

Is it possible to do that ?

Thank you.
Last edit: 6 years 9 months ago by chanteur94.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 9 months ago #301993 by krileon
Replied by krileon on topic Display Tab, conditionnal by a Tab
Add a Custom > Value condition to check against the value of [get_tab] as the tab is a GET value. So if in your menu item you specified a value of 1 for the Tab parameter you'd be able to condition against it as follows.

Tab 2
Display: Field conditional hide
Field: Custom > Value
Value: [get_tab]
Translate Value: No
Operator: Equal To
Value: 1
Translate Value: No
Locations
Registration: No
Profile Edit: No
Profile View: Yes
Userlists Search: No
Userlists View: No

The above should hide Tab 2 if the URL has Tab 1 specified. You'd basically just do the same for Tab 1 except change the conditioned value from 1 to 2. In all other cases both tabs will display normally so you don't break general profile URLs that don't have tab specified in 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.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 9 months ago #302007 by chanteur94
Replied by chanteur94 on topic Display Tab, conditionnal by a Tab
Thank you very much Kyle.

It works when my menu is a CB Userprofile. (good news)

But when my menu is a CB Content module, It doesn't works. (I use CB Content module to display the Avatar of the user in the menu)

Best regards.

PS : how to learn/to know these fonctions like [get_tab], value, and other tricks ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 9 months ago #302012 by krileon
Replied by krileon on topic Display Tab, conditionnal by a Tab
Linked avatar and formatname are going to pick a Joomla menu item without tab so it's not going to work outside of your specific Joomla menu items unless you specifically add the linking your self using HTML I suppose. Something like the below for example.

Code:
<a href="index.php?option=com_comprofiler&view=userprofile&user=[user_id]&tab=1&Itemid=ITEM_ID_HERE"><img src="[avatar]" alt="avatar" class="cbImgPict cbThumbPict img-thumbnail" /></a>

Replace ITEM_ID_HERE with the ID of the menu item linked to tab 1.


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.
The following user(s) said Thank You: chanteur94

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
6 years 8 months ago #302996 by chanteur94
Replied by chanteur94 on topic Display Tab, conditionnal by a Tab
I come back on this thread because I have a little problem with hiding TAB. (with [get_tab])

When I 'DISPLAY' the user, the conditional hide works
When I 'EDIT' the user, after Updating or Canceling the modification, the conditional hide doesn't work.

What's wrong ?

Thank you.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 8 months ago #303004 by krileon
Replied by krileon on topic Display Tab, conditionnal by a Tab
Does &tab exist in the URL when editing the user? If not it's not going to work as you're specifically checking against a GET value.


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