Panels 3.0: The Powers Of Chaos Magic
-
Upload
chapter-three -
Category
Technology
-
view
4.832 -
download
4
description
Transcript of Panels 3.0: The Powers Of Chaos Magic
![Page 1: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/1.jpg)
Panels 3: The Power of Chaos Magic
Matt CheneyOctober 17th, 2009
BADCamp 2009
![Page 2: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/2.jpg)
in a galaxy far far away..
Panels 2 - Tips and Tricks (BADCamp 08)
![Page 3: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/3.jpg)
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?”
![Page 4: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/4.jpg)
What Does it Do?
![Page 5: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/5.jpg)
What Does it Do?
![Page 6: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/6.jpg)
A Little History....Panels 1 (5.x)
![Page 7: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/7.jpg)
A Little History....
Panels 2 (5.x) Panels 2 (6.x)
the long road...
![Page 8: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/8.jpg)
A Little History....panels 3.0 released
9.19.09
![Page 9: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/9.jpg)
The Panels ParadigmNo Blocks Every Page is a Panel
![Page 10: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/10.jpg)
A Tour of Panels
Panel PagesMini Panels
Panel Nodes
LayoutsViews 2
Node Overrides
OG
Field Placement
Panel StylingBlocks
![Page 11: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/11.jpg)
Panels and Chaos Tools
Chaos Tools
Panels
a shared suite of APIs and toolsto allow for wizardly development
a system of layout and pane control to create your website
drupal.org/project/ctools
drupal.org/project/panels
![Page 12: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/12.jpg)
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/
![Page 13: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/13.jpg)
Extending Panels: Paneshook_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
![Page 14: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/14.jpg)
Extending Panels: Layoutshook_panels_layouts()
A recipe for a custom panel layout...
layout_name.css+
layout_name.inc+
layout_name.tpl.php+
layout_name.png
![Page 15: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/15.jpg)
Content Creation in Panels
• Panels “Content Types”:Not Just for CCK!
• Create Content: Images/Feeds/Embeds
status:http://drupal.org/node/451928
![Page 16: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/16.jpg)
Front Page Scheduling
• 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
![Page 17: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/17.jpg)
panels-pane.tpl.php
status:http://drupal.org/node/583172
(now in Panels 3.1!)
Variables available: * - $pane->type: the content type inside this pane * - $pane->subtype: the subtype, if applicable. If a view it will be the view name; if a node it will be the nid, etc. * - $content->title: The title of the content * - $content->content: The actual content * - $content->links: Any associated links * - $content->more: An optional 'more' link * - $content->admin_links: Administrative links * - $content->feeds: Any feed icons or associated with the content
Why This Matters?
<div class="panel-pane panel-pane-<?php print $pane->type; ?>">
![Page 18: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/18.jpg)
Node/% Overrides• Better Node View Control
• Customized Sidebars
• The Power of Context
• Layout UI that Makes Sense
![Page 19: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/19.jpg)
OG Panels
• OG + Panels = Great
• A model for how to have users manage groups
status:http://drupal.org/project/og_panels
![Page 20: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/20.jpg)
Total Admin Control• Views 2 + Panels 3
= Admin 5000
• Flexible + Customizable
• The Content Admin Solution
status:http://drupal.org/project/total_control
![Page 21: Panels 3.0: The Powers Of Chaos Magic](https://reader034.fdocuments.net/reader034/viewer/2022052321/554bdde6b4c9058f6c8b57a1/html5/thumbnails/21.jpg)
The Future Is Nowreleased