Is there a way to display all the members that belong to a certain group_id inside a template without resorting to the lame and gross profile_themes nonsense?
3 Answers
I just did this recently with the AC Member List add-on.
{exp:ac_memberlist group_id="5|6|7"}
<h2>{screen_name}</h2>
<li>Username: {username}</li>
<li>Name: {screen_name}</li>
{/exp:ac_memberlist}
Make sure this is outside of any {exp:channel:entries}
tag. I spent hours with that mistake :)
You will need to use either a custom query
{exp:query sql="SELECT * FROM exp_members GROUP BY group_id"}
tags here
{/exp:query}
The other option would be to use an add-on such as Solspace User and their users tag
{exp:user:users}
content
{/exp:user:users}
-
Actually, AC Memberlist is the route to take apparently. Thanks though Justin. Feb 12, 2013 at 23:54
We've done it before, but as we've been using Profile:Edit or Zoo Visitor, we've just used the standard exp:channel:entries tag to do the listing as Member data is transferred into Channel Entries.
{exp:channel:entries
channel="members"
dynamic="off"
status="Open"
group_id="8"
limit="50"
}
Job done.
-
Unfortunately, I don't have that as an option. It's for an established site so it has to use the EE Member data. Thanks though :) Feb 12, 2013 at 23:48