jacksleight / statamic-memberbox

This Statamic addon adds a few member related extras on top of Statamic’s existing user features.
https://statamic.com/addons/jacksleight/memberbox
Other
2 stars 3 forks source link

Member Organisation #29

Open mikemartin opened 1 year ago

mikemartin commented 1 year ago

Background In Statamic 2 it was possible to attach taxonomies to Users. However it looks like this feature was dropped since V3 and you can now only use taxonomies with collection entries.

Use Case My particular use case is a directory of student alumni 👩‍🎓 organised by Class Year.

Class listing The Class list should work the way that the taxonomy tag works, where only classes with students are shown. It's also important that the classes can be ordered by title.

Routes It should be easy to create routes for each class (/class/{slug}) and show the related members on the template view.

Edit Profiles It should also be possible for Members to add or update their class year on the profile update form.

User Groups? While user groups make sense for this use case, I feel like user groups should be used for managing permissions. Using taxonomies also means you can use more than one taxonomy with users if you were building a much larger directory. (ie: Class, Club, School, etc)

jacksleight commented 1 year ago

Hey Mike, gotcha that all makes sense, and I agree that taxonomies would be the way to go here.

It should be easy to create routes for each class (/class/{slug}) and show the related members on the template view

So if you're using taxonomies then this should be covered by core.

It should also be possible for Members to add or update their class year on the profile update form.

I've never tried a taxonomy field but hopefully this should also work with core's user:profile_form tag.

So as far as new features go you just need the ability to fetch the taxonomy terms that have users assigned to them right? I wouldn't be able to mess with core's taxonomy tag, but I could potentially implement some kind of mb:taxonomy:user tag.

Would that work for you?

mikemartin commented 1 year ago

Hey @jacksleight A taxonomy:users tag sounds like it would do the trick. Sounds good to me!

jacksleight commented 1 year ago

Just a thought, you could also achieve the same thing with https://statamic.com/addons/stillat/entry-relationships. Set up a users field in the taxonomy blueprint then filter based on that.

mikemartin commented 1 year ago

Thanks. I just stated playing with the entry relationships on another project. Might be worth a try.