Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
OG-vocab module allows creating a relation between a taxonomy-vocabulary and a group.
Patches needed
Related patches (but not required)
- #1472596: Free tagging entity reference to a vocabulary does not create the term, only allows existing terms (Work in progress)
Settings
- Create a new content type that is a group (e.g. “School”), and one that is a group-content (e.g. “Post” )
- Add the "OG vocabulary" field under
admin/config/group/fields
(select from bundles: Post, fields: OG vocabulary) - Create a new school node
- Under the “Group” tab, click on the new “Taxonomy” link
- Add a new vocabulary. Note that OG-vocab scanned all the group-content that can reference our current group, showing you a checkbox next to each content type - in our case “Post”
- Enabling the checkbox reveals the configuration, which allows you to set the widget-type, whether the widget should be required, and the amount of items allowed
- Add a few terms
- at admin/structure/types/manage/post/fields/og_vocabulary, change the OG Vocabulary field settings target type to Taxonomy Term from OG Vocabulary. Leave all target bundles unchecked.
- Create a new “Post” node (node/add/post) and notice the new widget(s) added
Attachment | Size |
---|---|
og1 3.37.05 PM.jpg | 89.85 KB |
og2 3.37.05 PM.jpg | 58.41 KB |
og3 3.37.05 PM.jpg | 54.77 KB |
og4 3.37.05 PM.jpg | 80.47 KB |
og5 3.37.05 PM.jpg | 45.12 KB |