Skip to content

04. For Developers and Site Builders

Alejandro Cremaschi edited this page May 28, 2022 · 2 revisions
  • Views integration: There are some default views that ship with the module. Follow those views configuration in terms of best practice (e.g. adding a relationship to the group-membership entity instead of querying directly the group-audience field).
  • Token integration: Unlike D7 Backdrop provides a large number of tokens in core. Enable the Entity Tokens module for additional ones (especially if you want to use any og_membership tokens).
  • Rules integration: Organic groups is shipped with Rules configurations that allow simple notification and other tasks. They are disabled by default. You can clone and change their behavior.
  • You may craft your own URLs to prepopulate the group-audience fields (e.g. node/add/post?field_group_audience=1 to prepopulate reference to node ID 1), using the "Entity reference prepopulate" module https://backdropcms.org/project/entityreference_prepopulate and configuring the correct settings in the field UI. Read more about it in Entity reference prepopulate's README file.
  • Furthermore, when Entity reference prepopulate module is enabled the node "create" permissions will be enabled even for non-members. In order to allow a non member to create a node to a group they don't belong to, you should craft the URL in the same way. OG will recognize this situation and add the group as a valid option under the "My groups" widget.
  • When deleting groups, it is possible to delete orphan group-content, or move it under another group. In order to do it in a scalable way, enable the "Use queue" option, and process it using for example: drush queue-run og_membership_orphans (TO BE TESTED)