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?
4 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. Commented 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 :) Commented Feb 12, 2013 at 23:48
I know that this is an old post, but I am posting this answer in case anyone else should stumble upon it.
EE7 (and I think EE6) have exposed all of its member tags, as well as the {exp:member:memberlist} tags so you can build these lists in your own template designs and are not restricted by the "lame and gross profile_themes nonsense".
You can then combine the {exp:member:memberlist} tags with the {exp:member:custom_profile_data} tags to build out flexible member lists based on your own configuration and need, inside of your own site templates.
They have also made the {exp:member:member_search} functions available in the same way, to allow you to create dynamic, sortable lists.
Documentation can be found here: https://docs.expressionengine.com/latest/member/memberlist.html