Member Directory

Hello all,

I’ve taken over management of our MODX sites from a departed co-worker so I’m a bit new to the platform. I’m looking to create a member directory page that has a list of members (with basic details) and a detail page per member (with more details). I’m just wondering what would be the best resource type to use to create this structure? I’ve dealt with the article resource type so that was my first inkling but not sure if that’s the best route. Any help would be much appreciated.


You probably have to create a custom snippet for this. I’ve done something similar in the past here which might be useful to adpat for you:

I guess I should clarify. My use case is actually more simple than that. The member info I’m going to be displaying is just going to be collected from submissions and then manually entered for each member listing. So our user will get the member’s data and then enter it to create a new member detail in the member list.

So really I’m just wondering if I should use the “article” resource type to accomplish this or if there is a different resource best suited for this type of structure.

So then there’s two ways (that I can think of) how you can accomplish this:

  1. You can make it resource based, so every member has it’s own dedicated resource where all the data for that user is stored. You could use the articles resource type, I don’t really see why you would want to though, or is there any specific fields or funcitonality you’re achieving with this?
    Otherwise you can just use a regular resource with a template and create TVs for the values and data you need for each user. Maybe have a look at the Collections Extra, which let’s you group your resources and hide them within the resource tree.

  2. Depending on the amount of users you plan on getting, it might be easier to just create a MIGX TV, which you then can asign to a resource and have it act like a members template to fill in the data.

Both solutions enable you to later fetch all or individual users with your desired data to display on one or multiple sites.

You might take a look at the Peoples extra. It’s basically getResources for users. As long as the information you want is in the user profile (or could be added there), I think Peoples (you may also need PeopleGroups) will handle both types of pages you want using the &where property to select a single user or all member users, and a different Tpl chunk for the two pages.

I’d use a ContentBlocks repeater field for this. Or, if ContentBlocks isn’t an option, MIGX and a snippet.