Using Drupal's Organic Groups module: who, what, where, why and when? We'll discus potential alternatives and go into a little more depth with 3 case studies. We’ll sort out any of the pain points you have experienced -- and show you new ways to leverage Organic Groups has to offer.
By UBC's Valerie Eades and Renée Stephen
2. ABOUT US
Valerie Eades
Programmer Analyst
UBC IT Web Services
dmt.it.ubc.ca
Renée Stephen
CMS Developer & Webmaster
UBC Computer Science
3. Roadmap
WHY use it?
WHO should use it?
WHAT is it?
HOW does it work?
Examples of WHERE and WHEN
(case studies)
4. WHY use Organic Groups?
Easy to create complex relationships between
content and entities
Powerful means for users to self organize
around content they care about
Flexible user-powered access control
Plentiful third-party integration
5. Roadmap
WHY use it?
WHO should use it?
WHAT is it?
HOW does it work?
Examples of WHERE and WHEN
(case studies)
6. WHO needs it?
If you:
● need content organization with flexible access
control
● want private discussion or document-sharing spaces
● need a wiki or collaborative space, but want better
usability and organization
● have subunits wanting to brand and control content
but share other areas of their site.
7. Roadmap
WHY use it?
WHO should use it?
WHAT is it?
HOW does it work?
Examples of WHERE and WHEN
(case studies)
8. WHAT is Organic Groups (OG)?
It’s a little Drupal site within your Drupal site!
Groups:
● have members, roles, and permissions
● can have $THINGS added to them by their members
Group content can be organized, displayed using group
membership and a user’s group access.
9. WHAT is Organic Groups (OG)... cont?
● Each group is a collection of stuff + permissions
● Users can subscribe, or be added by members
● Members assigned
roles, permissions
● Members administer,
managing roles,
users, permissions.
11. Roadmap
WHY use it?
WHO should use it?
WHAT is it?
HOW does it work?
Examples of WHERE and WHEN
(case studies)
12. HOW?
Group entities have attributes:
●
●
●
●
Memberships (fieldable)
State (active / pending / disabled)
Roles
Permissions
...which can integrate with:
13. HOW?
Two key fields:
Group (int):
is the entity a group?
Group audience (entityreference):
assign this content to groups
Plus helper fields:
Group visibility (int):
Can user alter content visibility
Group roles and permissions (int):
Let group manager override defaults
16. Roadmap
WHY use it?
WHO should use it?
WHAT is it?
HOW does it work?
Examples of WHERE and WHEN
(case studies)
17. WHERE & WHEN?
Case Study 1: Community sites
Case Study 2: Content organization with baked-in access
control
Case Study 3: Subsite management
18. Case Study 1: Community sites
● Out of the box, OG is a community site-builder
● OpenAtrium, Commons: powered by OG
19.
20.
21.
22. Case Study 1: Community sites
● Out of the box, OG is a community site-builder
● OpenAtrium, Commons: powered by OG
● Simple alternatives:
● Flag and/or Entityreference, with Node
Access Node Reference to pass access
● Content Access, Forum
23. Case Study 2: an Intranet
We needed self-organizing working groups,
committees.
Some wanted:
● universal public access
● mixed access
● specific access control over some content.
… They all wanted to control memberships and
permissions to add / edit / delete.
27. Pros / Cons?
Alternatives? Taxonomy Access Control (TAC),
Content Access, Workbench...
OG lets you:
● Delegate “module-lite” permissions to users
● Users manage almost anything in “their”
group
28.
29.
30. Integrations
OG LDAP - OG Menu - OG Workflow - Rules Views - Tokens - OG Moderation - Profile2 Panels - Search API - Webform - ...
etc
etc
etc
…
About 387,000 results (0.20 seconds)
31. Case Study 3: “Multi-site”
Website for organization with sub-units
Share some structures, content, design
Sub-units:
●
●
●
●
Have own content requirements
Content editors
Need individualized branding
Want their own domain
32. Case 3: Example
UBC’s office of
the Vice President
Research &
International
(VPRI)
reseach.ubc.ca
34. Case 3: The OG Solution
Create a content type “sub-site” as group type
Create a number of group content types:
“Announcement”
“Carousel Item”
“Event”
“Page”
“Profile”
“Webform”
Use views to create “sub-site” content blocks
for shared group content types
35. Case 3: Organizing with OG Menus
1. When creating new group content types (e.
g. Page) – check “Enable for OG Menus”
36. Case 3: Organizing with OG Menus
2. When creating new “sub-site” check
“enable menu for this group”
37. Case 3: Organizing with OG Menus
Organic Menus have own link under admin>structure
Or can be access by path: admin/structure/og_menu
38. Case 3: Differentiating Sub-sites by Path
Alias
Edit url alias patterns to
include “group” name in
path
Using token:
[node:og-group-ref]
Needed for:
●
Views contextual filter
●
Domain handling
39. Case 3: Theming Subsite
Global Base Theme
common look and feel
Subthemes
for each “sub-site”
Each “sub-site” can apply
theme settings, css,
scripts, templates as
needed
40. Case 3: Applying Theme to Sub-site
Using “ThemeKey” module
(admin/config/user-interface/themekey)
Available
Properties:
Group ID
Group Type
Note: group:id = nid
for group type entity
instance
41. Case 3: Adding sub-site domain
Server directives:
1. Create server
alias for
additional
domains
42. Case 3: Redirect Domain Request to
Sub-site
Server directives:
2. Use rewrite rules to
direct domain to
right content path
Mysub.domain.com
=>
Mysub.domain.com/
<subsite>
43. Case 3: Domain Handling for Drupal Path
1. Make sure right path is attached to right domain
Awkward – needs PHP redirect scripts
44. To sum up….
WHY: Flexibility, user control
WHAT: Entities -> entities, roles, permissions
WHO: needs a better wiki, community space, or
sub-site.
HOW:
- Organic Groups Documentation: https://drupal.
org/node/2014733
- Lullabot training videos:
http://drupalize.me/series/organic-groups-drupal-7