Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Theming and content basics - Drupal Camp CT 2011

879 views

Published on

This presentation covered theme basics including: anatomy of a Drupal theme, template layout and we created a basic theme.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Theming and content basics - Drupal Camp CT 2011

  1. 1. Theming Basics - Turning A Static HTML Site Into A Drupal Theme<br />Matt Tarsi<br />Senior Web Developer<br />mtarsi@am-llc.com<br />08/20/11<br />
  2. 2. Introduction<br />Matt Tarsi<br /><ul><li>tars16@d.o
  3. 3. Been working with Drupal for 4 years
  4. 4. Mainly Theming and Site Building
  5. 5. First DrupalCamp Presentation</li></ul>2<br />
  6. 6. Agenda<br />Anatomy of a Drupal Theme<br />How are my Pages Being Built?<br />PHP Required?<br />Create Our Theme<br />Q&A<br />3<br />
  7. 7. Anatomy of a Drupal Theme<br />.info file (only required file)<br />name*<br />description<br />core*<br />engine**<br />screenshot<br />base theme<br />stylesheets<br />scripts<br />features<br />regions<br />* Required** Required most of the time<br />4<br />
  8. 8. Anatomy of a Drupal Theme<br />Templatefiles (.tpl.php)<br />HTML Structure<br />PHP Variables<br />No complex logic<br />Core templates contain documentation<br />Override by copying<br />Default template suggestions can be found here: http://drupal.org/node/190815<br />5<br />
  9. 9. Anatomy of a Drupal Theme<br />Contains Complex Logic<br />Used to preprocess or process<br />Advanced<br />6<br />template.php<br />Theme Registry<br /><ul><li>Cache of available hooks and theme functions (and template files)
  10. 10. Clear for New Templates or Functions
  11. 11. Performance Page, Devel Module, Admin Module</li></li></ul><li>Anatomy of a Drupal Theme<br />Misc files<br />Logo.png<br />Screenshot.png<br />Favicon.ico<br />7<br />
  12. 12. Anatomy of a Drupal Theme<br />Where do I put my new theme?<br />/sites/all/themes/your_theme<br />8<br />
  13. 13. How are my Pages Being Built?<br />html.tpl.php<br />9<br />page.tpl.php<br />region.tpl.php<br />region.tpl.php<br />block.tpl.php<br />node.tpl.php<br />region.tpl.php<br />
  14. 14. PHP Required?<br />If you can copy and paste…<br />10<br />you’re good<br /><?php print blah($blah[‘blah’]); ?><br />
  15. 15. Demo Time<br />11<br />
  16. 16. Q & A<br />12<br />

×