[SOLVED] Userlist, display results categorywise?

13 years 7 months ago #141794 by palmqviststefan
[SOLVED] Userlist, display results categorywise? was created by palmqviststefan
Hi,

I would like to create a userlist along the following lines. Say that I have different members on the site, where each user can belong to different groups, say A and B. Each member belongs to at least one group, but could possibly belong to both. I am using a multicheckbox field with the two options "Group A" and "Group B" to determine which group the user belongs to. The number of users in each group will change over time.

The output I want in my userlist is the following.

Group A
Adam
David
Eric

Group B
Alfred
David

I guess this can be done changing the content of default.php, but cannot really figure out how. Any thoughts?

/Stefan

Post edited by: palmqviststefan, at: 2010/09/10 18:20

Post edited by: krileon, at: 2010/09/16 16:51

Please Log in to join the conversation.

13 years 7 months ago #141860 by krileon
Replied by krileon on topic Re:Userlist, display results categorywise?
Could you not just order by that field and it'll place all users of the same groups together? What you seam to be wanting is 2 userlists on 1 page which isn't easily doable (would require good deal of custom development).


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.

13 years 7 months ago #141888 by palmqviststefan
Replied by palmqviststefan on topic Re:Userlist, display results categorywise?
Hi Krileon,

you are absolutely right in that I am trying to display two different userlists on one page. In reality, I have about 10 different groups, and I'd rather not have 10 different userlists with 2-5 persons in each group.

If I sort the members by i)Group, and ii)Name and then display Group and Name in the columns of a userlist I would get:

Group A Adam
Group A, Group B David
Group A Eric
Group B Alfred

I could live with this output, if it weren't for the members that belong to more than one group.

My general idea would be to create a loop over the groups and for each group first display the label, say Group A, and then the members that belong to that group.

I understand that this is not simple, but any help is greatly appreciated.

/Stefan

Please Log in to join the conversation.

13 years 7 months ago #142024 by krileon
Replied by krileon on topic Re:Userlist, display results categorywise?
Can't really be done IMO. You'd need to develop a component plugin or component to duplicate the rendering of Userlists but rendering 2 instead of 1. Not really an easy approach that I am aware of to accomplish. My best suggestion is just to use multiple userlists and let users select a new one from drop-down.


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.

13 years 7 months ago #142121 by palmqviststefan
Replied by palmqviststefan on topic Re:Userlist, display results categorywise?
OK,

thanks for your quick reply. I will try to figure out another way to achieve what I want.

/Stefan

Please Log in to join the conversation.

13 years 5 months ago #145202 by palmqviststefan
Replied by palmqviststefan on topic Re:[SOLVED] Userlist, display results categorywise?
I found a way to achieve what I want. I first create the userlists I need for Group A and Group B. I then create an article called, say, "Group Members".

In the article I can then display the two lists on the same page using iframes.

My not be the prettiest solution to what I want, but it works. The only problem I have now is how to autosize the 2 iframes.

/Stefan

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn