complex content structures and workflow with drupal
DESCRIPTION
Goal of the session is to explore some case studies for advanced content types to meet the needs of government agencies. This session will cover recent government case studies for taking content types to a whole new level to allow our clients control over: Order of content Moderation of content Revisioning of content Bundle Publishing Using tools such as Rules, Workbench, Node References, Context, and many more! We'll go over the decision making process and why content types were a better route than nodequeues or simple view filters.TRANSCRIPT
Complex Content Structures and Workflow with Drupal
May 19, 2012
Krystee Dryer @krysgeekJeannette Modic @moondancerjen
Introduction
Balance Interactive Inc. www.BalanceInteractive.com
Balance Interactive is a full service web design & development agency. We help our clients strategically use online technology by using a holistic approach to their needs.
Content
Front End
Back End
Content Problem
Balance Interactive Inc. www.BalanceInteractive.com
More and more of our projects have a big need for specialized structured pages that are easy to maintain and have revisioning, archiving and workflow processes attached to them.
Normal Drupal Solution
Balance Interactive Inc. www.BalanceInteractive.com
Create special content types such as Slideshow and Callouts and use with normal Page content type. Special items like slideshows can be selected and ordered by nodequeues.
Advantages:
• Easy to define content type
• Reduce your number of content types to manage
Disadvantages:
• Old data cannot be preserved
• Page content go through moderation, revisioning and workflow, but other elements cannot
Better Drupal Solution
Balance Interactive Inc. www.BalanceInteractive.com
Create a content type for that special type of page, such as home page or top level page, and have all elements of the page as fields.
Advantages:
• Eliminate unnecessary fields from normal interior pages
• Revisions and archives of content can be saved
• Whole pages (with all elements) can go through required moderation and workflow processes
Disadvantages:
• Adds to your list of content types
Better Drupal Solution
Balance Interactive Inc. www.BalanceInteractive.com
Create separate content types for each type of page and include all elements as fields (text, file, node references, etc).
Order of elements displayed can be handled in a drag and drop fashion. Revisioning is handled through normal node revisioning.
Better Drupal Solution
Balance Interactive Inc. www.BalanceInteractive.com
Using the Workbench Moderation module, custom workflow states can be defined to move the custom content type to the point of being published on the live site.
The Rules module can be used to unpublish old homepages once a new one is published, so they are not accessible by search.
Special Cases – Bundle Publishing
Balance Interactive Inc. www.BalanceInteractive.com
Parent Node Publishes them all when set to Published.
Ready to be
Published
Ready to be
Published
Ready to be
Published
Problem: Content needs to be packaged together and move together in a workflow process.
Example: Multipage Reports
Tip: This solution can also be used for archiving content or bulk unpublishing content.
Special Cases – Bundle Publishing
Balance Interactive Inc. www.BalanceInteractive.com
Solution: Use a combination of Books, Workbench Suite, and Rules to bundle content and move it through a workflow.
• Use the Book module to relate child items to parent items
• Use Workbench Moderation States for moving content through the workflow
• When the parent node is moved to the Published state a custom Rule will be triggered that will check all the children nodes
• If the children are “Ready to be Published” then the Rule will loop through and publish them all
• If they are not, then no nodes will be published and an error message will be printed
Special Cases - Dates
Balance Interactive Inc. www.BalanceInteractive.com
Problem: Multiple dates need to be attached one document.
Special Cases - Dates
Balance Interactive Inc. www.BalanceInteractive.com
Solution: Have fields for each date type and use the computed field module to make all of the inputted dates into one date that can be used for display and sorting.
• Use client’s business logic to determine what date takes precedence
• Translate this logic into PHP conditionals
• Recalculate date every time item is revised
• Use the calculated date in the template and views with appropriate label
Special Cases – Styling Options
Balance Interactive Inc. www.BalanceInteractive.com
Problem: The client needs automatic styling on slide show text or callouts to account for image differences.
Special Cases – Styling Options
Balance Interactive Inc. www.BalanceInteractive.com
Solution: Create a field with radio buttons to list styling options and use that to output as necessary.
Use this field to add the selected color into the class of the slideshow view and let the stylesheet define the styling associated with each selection.
More Info
Balance Interactive Inc. www.BalanceInteractive.com
Balance Blog: www.balanceinteractive.org/blog
Balance Interactive Inc. www.BalanceInteractive.com
QUESTIONS?
Contact us:
Follow us: @krysgeek, @moondancerjen
Drupal username: krysgeek, moondancerjen
View slides: http://slidesha.re/J4pWUM