5

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 4

4

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 :)

5

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} 
1
  • Actually, AC Memberlist is the route to take apparently. Thanks though Justin.
    – Eric Lamb
    Feb 12, 2013 at 23:54
4

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.

1
  • 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 :)
    – Eric Lamb
    Feb 12, 2013 at 23:48
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.