Panels 3: The Power of Chaos Magic Matt Cheney November 14th, - - PowerPoint PPT Presentation

panels 3 the power of chaos magic
SMART_READER_LITE
LIVE PREVIEW

Panels 3: The Power of Chaos Magic Matt Cheney November 14th, - - PowerPoint PPT Presentation

Panels 3: The Power of Chaos Magic Matt Cheney November 14th, 2009 Drupalcamp Austin 2009 Panels is our Best Hope Marshall Content Drag & Drop Layout Configurable in the UI Views 2 + CCK Integration Killer API


slide-1
SLIDE 1

Panels 3: The Power of Chaos Magic

Matt Cheney November 14th, 2009 Drupalcamp Austin 2009

slide-2
SLIDE 2

Panels is our Best Hope

  • Marshall Content
  • Drag & Drop Layout
  • Configurable in the UI
  • Views 2 + CCK Integration
  • Killer API
  • Exportable Elements

“what do you want in your CMS?”

slide-3
SLIDE 3

A Little History....

Panels 1 (5.x)

slide-4
SLIDE 4

A Little History....

Panels 2 (5.x) Panels 2 (6.x) the long road...

slide-5
SLIDE 5

A Little History....

panels 3.0 released 9.19.09

slide-6
SLIDE 6

What Does it Do?

slide-7
SLIDE 7

What Does it Do?

slide-8
SLIDE 8

The Panels Paradigm

No Blocks Every Page is a Panel

slide-9
SLIDE 9

A Tour of the Amazing

slide-10
SLIDE 10

Node Overrides + CCK

  • Allows Panels to Power the Node

Display

  • Harness the Power of CCK

(and why this rocks in CCK 3)

slide-11
SLIDE 11

Node Overrides + CCK

showcase

slide-12
SLIDE 12

Views 2 Integration

slide-13
SLIDE 13

Views 2 Integration

showcase

slide-14
SLIDE 14

Styles + skinr.module

slide-15
SLIDE 15

panels-pane.tpl.php

status: http://drupal.org/node/583172 (now in Panels 3.2!)

Variables available: * - $pane->type: the content type inside this pane * - $pane->subtype: The subtype, if applicable. * - $title: The title of the content * - $content: The actual content * - $links: Any links associated with the content * - $more: An optional 'more' link (destination only) * - $admin_links: Administrative links * - $feeds: Any feed associated with the content * - $display: The complete panels display object Why This Matters? <div class="panel-pane panel-pane-<?php print $pane->type; ?>">

  • r for the really cool kids...

<div class=”panel-pane panel-position-<?php print $pane->position;?> panel-region-<?php print $pane->panel;?> panel-region-<?php print $pane->did;?>-<?php print $pane- >panel;?> panel-type-<?php print $pane->type;?> panel-display-<?php print $pane- >did;?> panel-pane-<?php print $pane->pid; ?>">

slide-16
SLIDE 16

Caching + Performance

If we are anonymous, we don’t (usually) care.... If we are logged in, we pay about 5%... (but we get pane caching for free)

slide-17
SLIDE 17

Panels, Ctools, Features

http://drupal.org/node/532256

slide-18
SLIDE 18

panels_scheduler.module

  • Add Date Field to Panel

Node Content Type

  • Create Custom Callback to

Find Current Page

  • return node_view($node)!

status: http://drupal.org/project/panels_scheduler

slide-19
SLIDE 19

panels_scheduler.module

enter the demo

slide-20
SLIDE 20
  • g_panels.module
  • OG + Panels = Great
  • A model for how to

have users manage groups

status: http://drupal.org/project/og_panels

slide-21
SLIDE 21
  • g_panels.module

enter the demo

slide-22
SLIDE 22

total_control.module

  • Views 2 + Panels 3

= Admin 5000

  • Flexible +

Customizable

  • The Content

Admin Solution

status: http://drupal.org/project/total_control

slide-23
SLIDE 23

total_control.module

enter the demo

slide-24
SLIDE 24

Panels and Chaos Tools

Chaos Tools Panels

a shared suite of APIs and tools to allow for wizardly development a system of layout and pane control to create your website drupal.org/project/ctools drupal.org/project/panels

slide-25
SLIDE 25

The Panels/CTools API

/** * Implementation of hook_ctools_plugin_directory() to let * the system know we implement task and task_handler plugins. */ function module_name_ctools_plugin_directory($module, $plugin) { return 'plugins/' . $plugin; }

module/plugins/content_types/ module/plugins/layouts/ module/plugins/contexts/ module/plugins/arguments/ module/plugins/tasks/

slide-26
SLIDE 26

Extending Panels: Layouts

hook_panels_layouts()

A recipe for a custom panel layout... layout_name.css + layout_name.inc + layout_name.tpl.php + layout_name.png

slide-27
SLIDE 27

Extending Panels: Layouts

enter the code

slide-28
SLIDE 28

Extending Panels: Panes

hook_ctools_content_types()

A recipe for a custom panel pane... module_custompane_ctools_content_types() + module_custompane_content_type_render() + module_custompane_content_type_edit_form() + module_custompane_content_type_edit_form_submit() more information in the ctools_plugin_example module

slide-29
SLIDE 29

Extending Panels: Panes

enter the code

slide-30
SLIDE 30

Content Creation in Panels

  • Panels “Content Types”:

Not Just for CCK!

  • Create Content:

Images/Feeds/Embeds

status: http://drupal.org/node/451928

slide-31
SLIDE 31

Content Creation in Panels

enter the demo

slide-32
SLIDE 32

The Future Is Now

released