10 steps to becoming a panels pro
TRANSCRIPT
Ten Steps to Becoming a Panels Pro
DrupaldelphiaJuly 29th, 2011
Harris Rashid
Harris RashidDrupal Themer and [email protected]
What is Panels? drupal.org/project/panelsdrupal.org/project/ctools
a creation of Earl Miles, the "merlinofchaos"
An Approach to Site Building
lullabot.com/podcasts
10 Steps:1) Page Layouts and Interface2) Custom Panels Layouts3) Variants4) Selection Rules5) Mini Panels6) CTools / Panels Content Types7) Panels and Views8) Layout Node Structure with Panels9) Panels and Features (Best Practices)10) Panels and Mobile (Mobile Tools)
Page Layouts
Panels Interface
Panels comes with some default Pages
> Structure > Pages > List
Add a PageBasic SettingsTitle, Decription, Path - Make this your homepage?Variant Type, Selection Rules?
Choose a LayoutPanels comes with default layouts
Panel SettingsAdmin TitleDisable Blocks and Regions?CSS ID - CSS code? (not recommended)
Panel ContentTitleRegion Cog Wheel - where you actually add content to your page
Write Your Own Custom Layout
*Use an existing Panel Layout:
/sites/all/modules/panels/plugins/layouts/
Write Your Own Custom Layout
Copy the Layout to your Theme's Directory
/sites/all/themes/your_theme/plugins/layouts/
Write Your Own Custom Layout
Edit your theme's .info file:
plugins[panels][layouts] = plugins/layouts
Variants & Selection Rules
Criteria for your Panel Pages and Panes to follow
Mini Panels
- Allows you to reuse panes on different panels
- Allows you to create complicated Layouts within Panel Panes
- Enable the Mini Panels module
Mini Panels
CTools Content Types
- Allows you to store re-usables panes in code, and not in the database.
- Nick Lewis Code Example: www.nicklewis.org
- Twitter Module Example
Panels and Views
- Use Panels and Views together through with Views Content Panes. (*enable the Views Content Panes module)
- Views Content Panes allows Panels to talk to Views.
Example: Taxonomy Term Pages.
Node Layout with PanelsBuild complex node layouts without editing node.tpl.php files.
Use Panel Panes to select the Fields you want to display.
Features Module- Keep these complex Panels Configurations in Code.
- Features allows you to export your configurations to a module. Works with Views, Taxonomy, Panels, Image Styles, Permissions.
- Performance gain
- Easier to recover if Panels configurations are changed.
- www.drupal.org/project/features
Panels and Mobile- Mobile Tools Module (drupal.org/project/mobile_tools)
- Use a Selection Rule to show a panel for Mobile Browsers
Thanks!