10 steps to becoming a panels pro

20
Ten Steps to Becoming a Panels Pro Drupaldelphia July 29th, 2011 Harris Rashid

Upload: green-for-all

Post on 11-May-2015

171 views

Category:

Software


4 download

TRANSCRIPT

Page 1: 10 steps to becoming a panels pro

Ten Steps to Becoming a Panels Pro

DrupaldelphiaJuly 29th, 2011

Harris Rashid

Page 2: 10 steps to becoming a panels pro

Harris RashidDrupal Themer and [email protected]

Page 3: 10 steps to becoming a panels pro

What is Panels? drupal.org/project/panelsdrupal.org/project/ctools

a creation of Earl Miles, the "merlinofchaos"

Page 4: 10 steps to becoming a panels pro

An Approach to Site Building

lullabot.com/podcasts

Page 5: 10 steps to becoming a panels pro

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 6: 10 steps to becoming a panels pro

Page Layouts

Page 7: 10 steps to becoming a panels pro

Panels Interface

Panels comes with some default Pages

> Structure > Pages > List

Page 8: 10 steps to becoming a panels pro

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

Page 9: 10 steps to becoming a panels pro

Write Your Own Custom Layout

*Use an existing Panel Layout:

/sites/all/modules/panels/plugins/layouts/

Page 10: 10 steps to becoming a panels pro

Write Your Own Custom Layout

Copy the Layout to your Theme's Directory

/sites/all/themes/your_theme/plugins/layouts/

Page 11: 10 steps to becoming a panels pro

Write Your Own Custom Layout

Edit your theme's .info file:

plugins[panels][layouts] = plugins/layouts

Page 12: 10 steps to becoming a panels pro

Variants & Selection Rules

Criteria for your Panel Pages and Panes to follow

Page 13: 10 steps to becoming a panels pro

Mini Panels

- Allows you to reuse panes on different panels

- Allows you to create complicated Layouts within Panel Panes

- Enable the Mini Panels module

Page 14: 10 steps to becoming a panels pro

Mini Panels

Page 15: 10 steps to becoming a panels pro

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

Page 16: 10 steps to becoming a panels pro

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.

Page 17: 10 steps to becoming a panels pro

Node Layout with PanelsBuild complex node layouts without editing node.tpl.php files.

Use Panel Panes to select the Fields you want to display.

Page 18: 10 steps to becoming a panels pro

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

Page 19: 10 steps to becoming a panels pro

Panels and Mobile- Mobile Tools Module (drupal.org/project/mobile_tools)

- Use a Selection Rule to show a panel for Mobile Browsers

Page 20: 10 steps to becoming a panels pro

Thanks!