Complex Content Structures and Workflow with Drupal

16

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 of Complex Content Structures and Workflow with Drupal

Page 1: Complex Content Structures and Workflow with Drupal
Page 2: Complex Content Structures and Workflow with Drupal

Complex Content Structures and Workflow with Drupal

May 19, 2012

Krystee Dryer @krysgeekJeannette Modic @moondancerjen

Page 3: Complex Content Structures and Workflow with Drupal

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

Page 4: Complex Content Structures and Workflow with Drupal

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.

Page 5: Complex Content Structures and Workflow with Drupal

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

Page 6: Complex Content Structures and Workflow with Drupal

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

Page 7: Complex Content Structures and Workflow with Drupal

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.

Page 8: Complex Content Structures and Workflow with Drupal

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.

Page 9: Complex Content Structures and Workflow with Drupal

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.

Page 10: Complex Content Structures and Workflow with Drupal

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

Page 11: Complex Content Structures and Workflow with Drupal

Special Cases - Dates

Balance Interactive Inc. www.BalanceInteractive.com

Problem: Multiple dates need to be attached one document.

Page 12: Complex Content Structures and Workflow with Drupal

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

Page 13: Complex Content Structures and Workflow with Drupal

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.

Page 14: Complex Content Structures and Workflow with Drupal

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.

Page 15: Complex Content Structures and Workflow with Drupal

More Info

Balance Interactive Inc. www.BalanceInteractive.com

Balance Blog: www.balanceinteractive.org/blog

Page 16: Complex Content Structures and Workflow with Drupal

Balance Interactive Inc. www.BalanceInteractive.com

QUESTIONS?

Contact us:

[email protected]

[email protected]

Follow us: @krysgeek, @moondancerjen

Drupal username: krysgeek, moondancerjen

View slides: http://slidesha.re/J4pWUM