Making Drupal Dance: Techniques for Non-obvious Theme Manipulations

1,398 views
1,348 views

Published on

These are the slides from my Design for Drupal: Boston 2009 presentation.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,398
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Making Drupal Dance: Techniques for Non-obvious Theme Manipulations

  1. 1. Making drupal dance <ul><li>Techniques for Non-obvious Theme Manipulations </li></ul>DESIGN 4DRUPAL BOSTON PRESENTOR JUNE 14, 2009 JOHN ALBIN WILKINS ( Johnalbin )
  2. 2. Secondary Links stink <ul><ul><ul><li>A Theme’s Primary and Secondary links or </li></ul></ul></ul><ul><ul><ul><li>Block containing Menu tree </li></ul></ul></ul>
  3. 3. Menu Block module, ftw <ul><li>http://drupal.org/project/menu_block </li></ul><ul><li>Multiple blocks for placement </li></ul><ul><li>Highly configurable: slice & dice your menu tree </li></ul>
  4. 4. The Drupal 6 Two Step <ul><ul><li>MODIFY YOUR VARIABLES: THEME_preprocess_HOOK(&$vars) </li></ul></ul><ul><ul><li>SLIGHTLY REARRANGE YOUR VARIABLES: HOOK.tpl.php </li></ul></ul>
  5. 5. Breaking up $content <ul><li>CCK can do it! </li></ul><ul><li>“ Display fields” tab admin/content/node-type/[TYPE]/display </li></ul><ul><li>“ Exclude” checkbox: removes field from $content, but still renders the field </li></ul>
  6. 6. Understanding the hidden order of tpls <ul><li>Which template gets rendered first? </li></ul><ul><li>How do we exploit the order of rendering to move variables around? </li></ul><ul><li>PHP’s static variables. </li></ul>

×