- Issue created by @SirClickALot
- π¬π§United Kingdom SirClickALot Somerset
Can anyone please offer a bit of insight as to how to use this module's features?
- πΊπΈUnited States liberatr Portland, OR
Here is an ECA model that shows one way to use this module, using the ECA_VBO module.
Advantage of this is that the Action should only appear if the user is a member of that group, and you can place it on the default Admin Content screen, if you are willing to recreate all of your other actions as ECA models. But really once you drink the ECA Kool-Aid you should learn how to do these, because you'll be using it all over the place.
- Enable eca_base, eca_content, eca_user, eca_vbo (separate download), group_action, views_bulk_operations
- Add the "Global: ECA bulk operations" field to your view. (this was very hard to figure out, as it seems like this should work with normal VBO actions, but it only works with the special ECA checkbox)
- Create a new ECA model
- Add an Event, use the template "VBO: Execute Views bulk operation (one by one)" and name it "Add to Group (Careers)"
- Add an Action, use the template "Group: Add Content (node only)"
- choose "Type of Group Content" = Content (dynamic)
- Set "Group ID / UUID" = 1 (or your group ID)
- Set "Entity" = [event:entity]
- Add an Event, use the template "VBO: Custom access for Views bulk operation"
- Set "Operation Name" to EXACTLY the same string as above, e.g. "Add to Group (Careers)"
- Add an Action, Use template "Current User: Load" with token name "user"
- Add an Action, Use template "Entity: Load"
- Set "Name of Token" = grouprel
- Set "Load entity from" = Type and properties
- Set "Entity type" = Group Relationship
- Set "Property Values"
type: "team-group_membership" gid: 1 uid: "[user:uid]"
Where 1 is the ID of the group you're using.
- Add a Condition, Use template "Token: Exists" and set "Name of token" = grouprel (or whatever you named your token in previous step)
- Add an Action, Use template "VBO: Set custom access on Views Bulk Operation" and leave "Access granted" as yes
- Save your ECA Model
- Edit your view, within the "Global: ECA bulk operations" field, make sure your new option is selected.
- Save the view
- For each group, you will need to recreate this Model