doing drupal multi-site without code
DESCRIPTION
Building a Dynamic Multi-site Presence Off-the-shelf Just because you can create customize functionality in your Drupal site, that doesn’t mean you need to. Come see how SGIA.org transformed their web presence by coloring within the lines. Not only did they build three websites on one installation and incorporate commerce functionality, they also created an online experience dedicated to ensuring their audience can find the rich and useful content they offer. We would like to share with you the strategies we used, the issues we faced, and the solutions we devised. This includes: - Tagging strategies and related content - Not your typical search functionality - Transitioning strategies to move between three themes - Commerce functionality and multiple domains Slides from our 2014 CapitalCampDC presentation. http://2014.capitalcampandgovdays.com/capital-camp-and-gov-days/sessions/building-dynamic-multi-site-presence-shelfTRANSCRIPT
![Page 1: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/1.jpg)
Building a Dynamic Multi-‐site Presence Off-‐the-‐shelf
Eric Johnson @elstudio Cindy McCourt @cindymcqt
1
![Page 2: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/2.jpg)
0. INTRODUCTIONSHow to succeed in multi-‐site building without really coding
2
![Page 3: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/3.jpg)
Eric Johnson
• Developer, Proprietor of el-‐studio.com
• Integrator of AMS/CRM/Drupal Commerce
• Loves writing code. But do we really need to?
• “There’s more than one way to do it”
3
@elstudio http://el-‐studio.com
![Page 4: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/4.jpg)
Cindy McCourt
• Site builder • Author of Drupal: The Guide to Planning & Building Websites
• Translates between tech & less-‐tech folks
• Taught the SGIA team what they need to know about fields, content types, taxonomy
4
@cindymcqt http://idcminnovations.com/contact
![Page 5: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/5.jpg)
SGIA
• Trade association represents several specialties – Garment decorators – Color graphics – Industrial
• A wealth of content • An AMS tracks people & memberships – Memberships determine the level of access onsite
5
@SGIA_graphics www.sgia.org
![Page 6: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/6.jpg)
What about you?
• Need to address multiple audiences with one editorial team?
• Want help with Drupal’s more-‐than-‐one-‐way-‐to-‐do-‐it? • Multi-‐site • Search • Content targeting
6
Who me? by Regina
![Page 7: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/7.jpg)
1. GOALSFor the project, and for the development team
7
![Page 8: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/8.jpg)
Project goals[...]
1. Address SGIA's separate Garment Decorators and Graphics audiences with distinct-‐but-‐related website designs and targeted content
2. Implement a standard look and feel across a decade worth of how-‐tos and technical resources
8
![Page 9: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/9.jpg)
Project goals[...]
3. Expose all SGIA content -‐-‐ web pages, spreadsheets, Word and PDF documents -‐-‐ to full-‐text search
4. Suggest related content dynamically, based on tags and full-‐text content analysis
5. Allow convenient access from both mobile and desktop browsers
9
![Page 10: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/10.jpg)
Project goals[...]
6. Build staff capacity with Drupal so that future site enhancements can benefit from SGIA's in-‐house graphics and programming expertise
10
![Page 11: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/11.jpg)
Dev team goals
• No code is best • Somebody else's code is better • Write code as last resort
11
![Page 12: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/12.jpg)
2. THEMESDesign: Fabulous, separate, themes
12
![Page 13: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/13.jpg)
Shared base theme (sgia_base)
13
![Page 14: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/14.jpg)
SGIA_garment theme
14
![Page 15: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/15.jpg)
SGIA_expo theme
15
![Page 16: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/16.jpg)
Consider: So how do we switch between themes?
• Standard Drupal Multisite • Great for separate sites — with separate databases, users, content etc.
• Domain Access modules[...]
16
![Page 17: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/17.jpg)
Domain Access allows Shared Content…
17See Trellon's Developer blog for details
![Page 18: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/18.jpg)
Consider: So how do we switch between themes?
• Standard Drupal Multisite • Domain Access module[...] • But I don't want to have separate users, database tables, DNS configurations, etc. I just want to switch themes.
• Help me, big blue drop!
18
![Page 19: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/19.jpg)
Themekey module!
• Switches theme based on path – Choose Expo theme if path is /expo/* – Choose Garment theme if /garment/*
• Or a node's taxonomy terms – Failing that, set theme based directly on [field-‐subsite]
– Reset to Base theme if needed
19
![Page 21: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/21.jpg)
Explicit Theme Selection
21
field_subsite, a list field, rules the themes
![Page 22: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/22.jpg)
Pathauto URL alias sets a page's path based on the [field-‐subsite] taxonomy vocabulary
22
![Page 23: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/23.jpg)
Choose Expo theme if path is /expo/*
23
![Page 24: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/24.jpg)
Failing that, set theme based directly on [field-‐subsite]
24
![Page 25: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/25.jpg)
Reset to Base theme if needed
25
![Page 26: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/26.jpg)
3. CONTENTFor each audience, and for multiple audiences
26
![Page 27: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/27.jpg)
Taxonomy Has Many Jobs
• Assign content to different community audiences • Select the appropriate theme
• Site architecture • Establish content relationships
27
![Page 28: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/28.jpg)
Communities
28
Community, a taxonomy vocabulary, indicates which audiences the content targets
![Page 29: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/29.jpg)
Site Architecture
29
![Page 30: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/30.jpg)
Related Content Relies on Tags
30
![Page 31: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/31.jpg)
Related Content via Views
31
![Page 32: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/32.jpg)
4. SEARCHAdapting search results to our audiences
32
![Page 35: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/35.jpg)
Separate search boxes for each theme
• Results optimized for each audience – Regular search[...] – Garment searches only Garment content[...] • Nodes where Community is Garment • field_vocab_community_tref contains “Garment” • Configuration: an apachesolr search page with custom filters[...]
35
![Page 36: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/36.jpg)
Configuration: an apachesolr search page with custom filters[...]
36
![Page 38: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/38.jpg)
Configuration: An apachesolr_search view
38
![Page 39: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/39.jpg)
Consider: SearchAPI vs apachesolr
• SearchAPI does a better job of supporting views & Drupally stuff like entity display modes —Can talk to Solr, using the search_api_solr module —It loads nodes before you or views sees them, so search_api_views act like you'd expect
—Because it's loading nodes, it can also be less efficient than apachesolr...
39
![Page 40: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/40.jpg)
Consider: SearchAPI vs apachesolr
• apachesolr is much closer to Solr than Drupal –Must know solr lingo to configure it: "im_field_vocab_community_tref:2"
– apachesolr_views can require 4+ patches to get common use cases working
– But apachesolr_attachments is the game in town for indexing Word, PDF or other file attachments
40
![Page 41: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/41.jpg)
5. COMMERCEMulti-‐site considerations for commerce
41
![Page 42: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/42.jpg)
Commerce Implications
• We ran commerce on a single domain • SSL can be an issue • Yes, Either buy a wildcard SSL certificate • That’s a cert for *.sgia.org
• But Apache SSL requires a separate IP per SSL domain
• Or run them singly
42
![Page 43: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/43.jpg)
6. RECAPWhat have we learned today?
43
![Page 44: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/44.jpg)
What have we learned?
• You can do lots of Drupal without writing code
• There’s more than one way to do it
• Ask: How can I empower the team?
• Just because you can, doesn’t mean you should
44
School by Elizabeth Albert
![Page 45: Doing Drupal Multi-site without code](https://reader031.vdocuments.net/reader031/viewer/2022020217/5560cbbdd8b42a0d088b4b85/html5/thumbnails/45.jpg)
Questions? Drop us a line…
45
Cindy McCourt @cindymcqt http://idcminnovations.com/contact
Eric Johnson @elstudio http://el-‐studio.com