Skip to Content Skip to Menu

[SOLVED] Rename tab depending on ACL

  • devodave
  • devodave
  • OFFLINE
  • Posts: 68
  • Thanks: 5
  • Karma: 0
9 years 11 months ago - 9 years 11 months ago #253890 by devodave
[SOLVED] Rename tab depending on ACL was created by devodave
Hello,

I had a look on the forum and could not find if it was possible to Rename a tab name depending on the ACL?

Thanks
Last edit: 9 years 11 months ago by nant.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48501
  • Thanks: 8284
  • Karma: 1443
9 years 11 months ago #253899 by krileon
Replied by krileon on topic Rename tab depending on ACL
Tab titles support substitutions so you should be able to use the access level IF substitution to do this. Example as follows.

[cb:if viewaccesslevel includes "1"]PUBLIC[/cb:if][cb:if viewaccesslevel includes "2"]REGISTERED[/cb:if]

Please see the below for further substitution information.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

I believe the title is varchar(255) though so you won't be able to have titles larger than 255 unless you use a language string then put your substitutions in the language string. Example of this usage as follows.

Title:
THIS_IS_MY_TAB_TITLE

Language String:
'THIS_IS_MY_TAB_TITLE' => '[cb:if viewaccesslevel includes "1"]PUBLIC[/cb:if][cb:if viewaccesslevel includes "2"]REGISTERED[/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: devodave

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

  • devodave
  • devodave
  • OFFLINE
  • Posts: 68
  • Thanks: 5
  • Karma: 0
9 years 11 months ago - 9 years 11 months ago #254081 by devodave
Replied by devodave on topic Rename tab depending on ACL
Thanks, works perfectly.

I am not even sure the tab title is even varchar(100)...
Last edit: 9 years 11 months ago by devodave.
The following user(s) said Thank You: nant

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48501
  • Thanks: 8284
  • Karma: 1443
9 years 11 months ago #254109 by krileon
Replied by krileon on topic Rename tab depending on ACL
Just as a heads up I double checked tab title and it's varchar(50). So for sure you'll want to use a language string for this.


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