Username in CB List

7 years 3 months ago #290354 by stuntlist
Username in CB List was created by stuntlist
Hi,

I need to display each member's username in a CB List. But username doesn't seem to be a value you can select in the CB List Columns tab fields.

If I can't select it in the CB List, is there a way to get it in the template file function _getUserListCell? Currently, I am parsing the profile link to get the username from it. But that is not robust and just broke when you changed the profile link from /userprofile/username to /myprofile/username. Can I use a CB substitution in the template file? What is the best way to get the user's username?

Thank you.

Please Log in to join the conversation.

7 years 3 months ago #290383 by krileon
Replied by krileon on topic Username in CB List
If username is not available to select for display in a column then it means the field isn't set to display on profile or isn't accessible. Ensure it's set to display on profile and you typically should be able to select it for display on your userlist. If you don't want it actually visible on profile you can move it to a tab in a not shown on profile position. You can also use a Custom HTML field and substitute in the username then display that Custom HTML field on your userlist.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.224 seconds

Facebook Twitter LinkedIn