Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Conditionally showing tabs based on a field value

  • kmm2908
  • kmm2908
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 0
13 years 10 months ago #152866 by kmm2908
I have a main profile tab that I wish to be displayed for all users.
Then I have tabs that I want displayed dependent on the setting in the cb_registrationtype field.
I have read an archived post from user 'kileon' on substitution and conditional code that lead me to come up with the following code:

[cb:if cb_registrationtype="Fighter"][cb:usertab tab="23" user="#displayed" /][/cb:if]

Can anyone tell me if the code is correct?
Can anyone tell me where to put the code? The post I referred to earlier stated a delimiter field, but then which tab would that delimiter field be on? One to be shown conditionally or the main profile tab?

Should the tabs to be displayed conditional on the field value be published or not published?

I have tried the code in a variety of places with tabs published and not published and not had any success. I feel that I'm getting close if someone can help out with the above.

Thanks in advance for any help. :)

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
13 years 10 months ago #152993 by heyai
Cannot directly answer your questions, but usually trial and error and krileon's tutorials ( www.allmysocials.com/tutorials ) lead to a good solution. Good luck!

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

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

  • kmm2908
  • kmm2908
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 0
13 years 10 months ago #153093 by kmm2908
Thanks for the link, I'm working my way through them now and they are pure gold. Thanks again for taking time to post the link.

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

  • kmm2908
  • kmm2908
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 0
13 years 10 months ago #153124 by kmm2908
Ok the tutorials are good but they don't unfortunately answer any of my questions above. I can get a tab to display in the tab area of another tab through use of substitutions but I cannot see how to conditionally display the tab itself as a separate tab.
Can anyone help with this or maybe I should be looking at another application to achieve what I am trying to do. SOBI2 maybe?
If I could just work out the code for conditionally displaying the tabs CB would be the perfect answer.
If I upgrade my membership would I have access to advanced support that could answer this?
In an earlier forum post krileon said it was possible but never gave the answer how to beyond saying use substitutions, conditional if statements and delimiter fields.
This is becoming very frustrating! :S

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
13 years 10 months ago #153189 by heyai
Well, if you create a new tab and put a tab-in-field delimiter in there you can display the tab-in-field based on conditions. I am not sure whether a tab containing one delimiter field will stay hidden if the delimiter is set not to show.

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 10 months ago #153193 by krileon
Conditionally displayed Tabs and Fields can be done with professional subscriber incubator project CB Conditional. Aside from that there's no other way to conditionally display tabs/fields outside of substitution usage in delimiter fields.


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