Tags on Groups

Hi all:

I'm working on a project that requires a special behavior for groups. In my site, all groups are closed by definition, but you should be able to subscribe directly to one (and only one) of them. I've modified the registration form with a custom plugin, where the user can choose to what group subscribe when he creates its account via dropdown list. For instance:

- Swimmers

- Scuba divers

- Snorkeling lovers

Once the user subscribe to one of these groups, he can ask to be subscribed to sub-groups, like  Winter Swimmers or Summer Swimmers (if previously selected Swimmers). That work seems that can be done with the subgroup plugin. The problem is that some other groups are "regional", and also requires that a moderator approves the membership. It means that these groups (Regional groups, Winter and Summer swimmers) can not be listed in the registration page. So, I would like to mark the groups somehow, in order to know which of these groups can be showed in the registration page. Is there any way to do so?

I'm quite new to elgg, but I have experience in programming with PHP, and I've read the elgg's docs, specially those that said "Do not touch the core or the database" 

Thanks in advance!

Best regards,


  • I believe that the subgroups concept will get you 90% of the way there - for example, you can make subgroups closed (moderated) and visible to group members only, so you'd have to join the parent group in order to see anything inside. Keep in mind that this goes against the "social" concept of Elgg - others can't see what's being posted to closed groups, so it takes away from the community aspect.

    Regarding your question around tagging groups: you can set a metadata flag and look groups up by that flag when displaying the registration page (see http://learn.elgg.org/en/stable/design/database.html#metadata). Personally, I'm not a huge fan of how metadata is stored, so I would be tempted to use relationships (http://learn.elgg.org/en/stable/design/database.html#relationships) even if it feels like a stretch.

  • Stan:

    Thank you very much for the quick answer. I'll try your advice and let you know.  I'm aware that this "closed group policy" is against the "social" concept of elgg, but that's a requirement from the owner of the site, due to the nature of the community intended.

    Best regards,



  • I agree with Stan, relationships are probably what you want. E.g. a "home_display" relationship between the group and the site entity, then use that via elgg_get_entities_from_relationships().