Skip to Content Skip to Menu

Show/Hide profile tab based on language

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
4 years 11 months ago #315059 by boyjahq
Your proposed solution works. Thank you!

For the record, here is the process:

In the Joomla URL, languages are specified by "lang=". I am using English and Japanese, so for English the URL shows "lang=en" and for Japanese it shows "lang=jp"

In Community Builder Tab Management I select the tab that I want to only show when viewers are on the English version of the website. Under the Integrations tab, I choose "CB Conditional" and then set as:

Display = Tab conditional show
Conditions are
Field = Value
Custom Value = [get_lang]
Translate Custom Value = No
Operator = Equal To
Value = en
Translate Value = No

For the tab that I only want to show when viewers are on the Japanese site, all settings are the same EXCEPT change Value = en to Value = jp

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
4 years 11 months ago #315073 by krileon
Shouldn't need to do that anymore since there's a language condition now. Specifically the below should work.

Field: Custom > Languages
Operator: Has
Languages: SELECT_LANGUAGES_HERE


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.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
4 years 11 months ago - 4 years 11 months ago #315085 by boyjahq
Based on my testing, the Languages custom field you to which you refer seems only to work based on the selected language parameter of a registered user. For those users who may not have specified a language parameter in their profile or for unregistered visitors to the site or for registered users who HAVE specified a language preference but wish to see the other language version of a tab or page (for educational or other puposes), the method I have outlined above seems to be the only way to truly control which language version of a tab or field are displayed based solely on the language version of the site they are on. Or am I somehow not getting correct results from the approach that you describe? Or perhaps a more accurate Subject for this post should have been "Show/Hide profile tab based on site language"
Last edit: 4 years 11 months ago by boyjahq.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
4 years 11 months ago #315090 by krileon
As long as their site language is still left as "- Use Default -" it'll work how you're wanting, but you are correct it will use that parameter if it has a value. Have added a feature ticket to review adding an additional parameter to the language condition so you can specify if it's for site or user language.

forge.joomlapolis.com/issues/7753


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: boyjahq

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

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
4 years 11 months ago #315091 by boyjahq
That would be AWESOME. Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
4 years 11 months ago #315093 by krileon
This is now implemented for CB Auto Actions and CB Conditional language conditions in their latest releases available now. New parameter below language selection called "From" defaults to current behavior of "User" with optional "Site" option. When selecting "Site" it will use whatever language Joomlas JFactory::getLanguage()->getTag() API responds with so I'm not entirely sure it'll work with URL language filtering, but I assume it will.


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