This presentation accompanies Tim Cosgrove's (timcosgrove) and Joe Turgeon's (arithmetric) presentation at Twin Cities Drupal Camp 2013.
What do you do when you need all content changes to run through workflow? Not just nodes... ALL THE THINGS!
What about translating all the things? Or maintaining revisions for all the things? Or making all the things use a common template system? When usually nodes get all the attention, how do you provide this kind of control across all the things on your Drupal site?
This is a case study about how Phase2 met these challenges for a consumer products company. We discussed the platform architecture for managing sites for multiple brands in multiple markets and languages, and the site components for providing control over all aspects of all page content.
12. “Brand Z”
• “Global leader in prestige beauty”
• Conglomerate of 26 brands
• $10 billion in sales annually with $1 billion in online sales
• Operates in 150 countries with 50 online
• Sites in about 30 languages
13. Core business needs
• Common architecture and infrastructure to build many sites
• Rapid roll out of regional site variants
• Multilingual ability for regional sites
• Allow for broadly divergent designs within a site
14.
15.
16.
17. Existing solution
• Custom-written commerce engine
• No dynamic CMS
• Content primarily stored in static HTML files
• Publishing content and pushing code are similar process
20. Core capabilities
• Drupal based distribution
• Ability to build sites for each brand
• Ability to create regional variants for each site
• Advanced content management
• Flexible layout system
21. English: branda.com
Spanish: branda.com/es
German: branda.ch
French: branda.ch/fr
Italian: branda.ch/it
“Brand A”
“Brand A” US site
“Brand A” Switzerland site
“Brand B”
English: brandb.com
Spanish: brandb.com/es
“Brand B” US site
English: brandb.ca
French: brandb.ca/fr
“Brand B” Canada site
24. Content management
• “Content” includes any public-facing text or media
• Able to be saved to multiple revisions, including drafts
• Subject to editorial workflow
25. Revisions
• More like “versions”
• Keep old copies of content
• Ideally, work on multiple versions of content at once
26.
27. Drupal revision support
• Keeps history of previous copies
• Can’t edit two copies independently
• No working drafts
• Only applies to nodes
• Only published/unpublished states
28.
29. Workflow requirements
• Add more states for content, like “draft,” “needs review,”
“approved”
• Restrict access to managing content by state
• Restrict access to transition the state of content
35. Solution: nodes!
• Drupal provides revisions for entities and fields
• Nodes have publication status and access control
• Existing contrib modules for workflow play nice
36. Menus
• Drupal menus are not strictly content nor site structure
• Admin UI for managing menus differs from managing nodes/blocks
• Not based on entities/fields
37. Solution: Menu Field
• Menu-like content as a field
• As a node, the menu becomes revisionable
• Built to mirror Drupal menu output
• Flexible menu content, images and rich text
43. Solution: State Flow
• Highly configurable workflow solution
• API-driven, developer-friendly
• Augments Drupal’s publishing controls and revision history
44.
45. Revision tagging
• Each revision can be labelled
• All content revisions with a tag can be acted on
46.
47.
48. Publication and preview system
• Preview whole groups of content updates together
• Publish, unpublish, and manage the workflow state of whole
groups of content en masse
49.
50.
51. Potential Drupal 8 improvements
• Entities everywhere
• Content Staging Initiative and Site Preview System
54. Flexible layouts
• Select different templates to use for the same content type
• Allow users to define complex inputs for the output of structured
content
• Allow users to build basic templates themselves and to reuse them
55. Multiple layouts in content
• Layouts are independent of content type
• Multiple layouts can be used in one content type
• Editors can define own layouts in CMS
56.
57.
58.
59.
60. Solution: Template Field
• Allows a single field to contain many pieces of data
• Each template has HTML, optional CSS & JS
• Can be in code, or DB; can be overridden
• Because it’s a field, can be revisioned
61.
62.
63.
64.
65.
66. Other benefits
• Allows node-specific layouts, even within one content type
• Layouts can be shared across content types
67. Control over blocks
• Content editors need to create blocks freely
• Need to be able to place blocks as part of page content
• Need to be able to embed blocks in other content
68. Solution: Block Reference
• Insert blocks into nodes as field content
• In combination with a content block solution, allows reusable block
content to be laid out in arbitrary layouts
69.
70.
71. Solution: Embedabbles
• Allows block content to be placed into rich text contexts
• Effectively allows revisioning of block placement within that
context
80. Content internationalization
• “Content” includes any public-facing text or media
• Content used in the CMS should be specific to a language
• Content should also be specific to a region
• Related translations grouped and accessible from the source node
81. “Subscription” vs “localization”
• Subscribed content adopts a specific piece of content from another
language
• Localized content begins as a copy from another language, but can
be edited independently and diverge
83. Each translation is distinct
• Translations may not be literal
• The version of content for a particular market/language should be
managed separately from other markets/languages