Skip to Content Skip to Menu

Statements in tab's titles

4 years 6 months ago - 4 years 6 months ago #317826 by crealiagroup
Statements in tab's titles was created by crealiagroup
Maybe a bug but it seems that if I try to use HTML and/or multitple statements inside tab's titles the text is truncated when I save.
Example, if I write this: [cb:if reason="register"]<i class="fa fa-smile"></i>[/cb:if][cb:if reason="profile"]Profile tab[/cb:if]
after saving I got this: [cb:if reason="register"]<i class="fa fa-smile"></

Also the HTML output in frontend is corrupted due to this error.
Last edit: 4 years 6 months ago by crealiagroup.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 6 months ago #317835 by krileon
Replied by krileon on topic Statements in tab's titles
Tab title has limited storage length. Use a language key then in CB language overrides you can have a title of whatever link you like. Example as follows.

Tab Title: TAB_01_TITLE

Key: TAB_01_TITLE
String:
Code:
[cb:if reason="register"]<i class="fa fa-smile"></i>[/cb:if][cb:if reason="profile"]Profile tab[/cb:if]

See the below on how to use language overrides in CB.

www.joomlapolis.com/blog/kyle/18701-language-overrides-have-arrived


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

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

4 years 6 months ago #317874 by crealiagroup
Replied by crealiagroup on topic Statements in tab's titles

krileon wrote: Tab title has limited storage length. Use a language key then in CB language overrides you can have a title of whatever link you like. Example as follows.

Tab Title: TAB_01_TITLE

Key: TAB_01_TITLE
String:

Code:
[cb:if reason="register"]<i class="fa fa-smile"></i>[/cb:if][cb:if reason="profile"]Profile tab[/cb:if]

See the below on how to use language overrides in CB.

www.joomlapolis.com/blog/kyle/18701-language-overrides-have-arrived


I've done what you suggested, it works fine in registration but not in profile edit. A bug?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 6 months ago #317884 by krileon
Replied by krileon on topic Statements in tab's titles
Ensure you've the latest CB build installed as the "reason" substitution value was only recently supported in tab titles.


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.

4 years 6 months ago #317899 by crealiagroup
Replied by crealiagroup on topic Statements in tab's titles
2.4.4+build.2020.04.14.16.36.55.34b252f57

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 6 months ago #317914 by krileon
Replied by krileon on topic Statements in tab's titles
What about it is not working in profile edit? Your IF conditions have registration and profile. You've no edit check so it won't display a tab title in profile edit. The reasons are as follows.

register = registration
edit = profile edit
profile = profile view
list = userlist view
search = userlist search

You'll probably want to use an ELSE case so you don't end up with an empty title. Example as follows.

[cb:if reason="register"]<i class="fa fa-smile"></i>[cb:else]Profile tab[/cb:else][/cb:if]

If you want profile edit to also be the icon you can use an OR condition. Example as follows.

[cb:if reason="register" or reason="edit"]<i class="fa fa-smile"></i>[cb:else]Profile tab[/cb:else][/cb:if]


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum