O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Doing Drupal Multi-site without code

2.359 visualizações

Publicada em

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.


Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Doing Drupal Multi-site without code

  1. 1. Building  a  Dynamic  Multi-­‐site  Presence  
 Off-­‐the-­‐shelf Eric  Johnson  @elstudio   Cindy  McCourt  @cindymcqt 1
  2. 2. 0.  INTRODUCTIONS How  to  succeed  in  multi-­‐site  building  without  really  coding 2
  3. 3. 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  
  4. 4. 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  
  5. 5. 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  
  6. 6. 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
  7. 7. 1.  GOALS For  the  project,  and  for  the  development  team 7
  8. 8. 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
  9. 9. 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
  10. 10. 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
  11. 11. Dev  team  goals   • No  code  is  best   • Somebody  else's  code  is  better   • Write  code  as  last  resort 11
  12. 12. 2.  THEMES Design:  Fabulous,  separate,  themes 12
  13. 13. Shared  base  theme  (sgia_base)   13
  14. 14. SGIA_garment  theme   14
  15. 15. SGIA_expo  theme   15
  16. 16. 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
  17. 17. Domain  Access  allows  Shared  Content…   17 See  Trellon's  Developer  blog  for  details
  18. 18. 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
  19. 19. 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
  20. 20. Themekey  Rulesets[...]     20
  21. 21. Explicit  Theme  Selection   21 field_subsite,  a  list  field,  rules  the  themes
  22. 22. Pathauto  URL  alias  sets  a  page's  path  based  on  the  [field-­‐subsite]   taxonomy  vocabulary   22
  23. 23. Choose  Expo  theme  if  path  is  /expo/*   23
  24. 24. Failing  that,  set  theme  based  directly  on  [field-­‐subsite]   24
  25. 25. Reset  to  Base  theme  if  needed   25
  26. 26. 3.  CONTENT For  each  audience,  and  for  multiple  audiences 26
  27. 27. Taxonomy  Has  Many  Jobs • Assign  content  to  different  community   audiences   • Select  the  appropriate  theme   • Site  architecture   • Establish  content  relationships 27
  28. 28. Communities 28 Community,  a  taxonomy  vocabulary,  indicates  which   audiences  the  content  targets  
  29. 29. Site  Architecture 29
  30. 30. Related  Content  Relies  on  Tags 30
  31. 31. Related  Content  via  Views 31
  32. 32. 4.  SEARCH Adapting  search  results  to  our  audiences 32
  33. 33. Regular  search[...]   33
  34. 34. Garment  search[...]   34
  35. 35. 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
  36. 36. Configuration:  an  apachesolr  search  page  with  custom  filters[...]     36
  37. 37. Search  views  augment  featured  content[...]   37
  38. 38. Configuration:  An  apachesolr_search  view   38
  39. 39. 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
  40. 40. 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
  41. 41. 5.  COMMERCE Multi-­‐site  considerations  for  commerce 41
  42. 42. 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
  43. 43. 6.  RECAP What  have  we  learned  today? 43
  44. 44. 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
  45. 45. Questions?  Drop  us  a  line… 45 Cindy  McCourt   @cindymcqt   http://idcminnovations.com/contact   Eric  Johnson   @elstudio   http://el-­‐studio.com