Last updated January 22, 2013. Created by joachim on January 22, 2013.
Log in to edit this page.
You can set up OG to be completely transparent to users:
- when a user creates content, the group reference field is hidden, and its value is set automatically
- when the content is edited, the group reference field is still hidden
This can be accomplished with the Entityreference prepopulate module.
- Enable the Entityreference prepopulate module
- Edit the group membership field on your group content entity
- Under 'Additional behaviours' enable 'Entity reference prepopulate', then select:
- 'Action: Hide Field'
- 'Apply action on edit'
You then need to create links to create new content which contain the prepopulate data in the URL, in the form: node/add?og_group_ref=GROUP_NODE_ID
Comments
Additionally, you can use
Additionally, you can use Menu Tokens to create links with paths like node/add/group_content?og_group_ref=[node:nid]. When menu is placed on a group page, [node:nid] will produce the current group ID.