If you do not have a ton of usergroups I suggest simply using substitutions in a Custom HTML field as follows to avoid extra resource overhead of doing a query.
[cb:if usergroup includes "8"]
Super Users
[cb:elseif usergroup includes "7"]Administrator[/cb:elseif]
[cb:elseif usergroup includes "6"]Manager[/cb:elseif]
[cb:elseif usergroup includes "5"]Publisher[/cb:elseif]
[cb:elseif usergroup includes "4"]Editor[/cb:elseif]
[cb:elseif usergroup includes "3"]Author[/cb:elseif]
[cb:elseif usergroup includes "2"]Registered[/cb:elseif]
[/cb:if]
The above if specifically checking the group id, which you can find in Users > Groups from Joomla backend. Note support for ELSEIF substitution usage was just recently added. See the below blog for further details.
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.
So I tried to copy/paste yours as is, and it doesn't seem to be working. The output on my profile (I am a super user, will display as:
Code:
Super Users
[cb:elseif usergroup includes "7"]Administrator[/cb:elseif]
[cb:elseif usergroup includes "6"]Manager[/cb:elseif]
[cb:elseif usergroup includes "5"]Publisher[/cb:elseif]
[cb:elseif usergroup includes "4"]Editor[/cb:elseif]
[cb:elseif usergroup includes "3"]Author[/cb:elseif]
[cb:elseif usergroup includes "2"]Registered[/cb:elseif]
So it seems to read the if statement, but the elseif statements are getting printed as text. For all the other users the field is just blank. I do have the newest 2.0.15 version of CB.
You need the latest nightly build, which is 2.0.15+build.2016.11.14.14.09.35.fac6068a1. I've tested the exact substitution supplied to you as working fine.
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.