January Meeting

Events happening in the community are now at Drupal community events on www.drupal.org.
dgorton's picture
Start: 
2008-01-23 19:00 - 21:00 US/Central

For the January meeting, Gorton Studios will walk through the home page of the Rake Magazine (one of our recent projects) and deconstruct it by looking at the files and code involved. Much of what will be covered is at least hinted at in our writeup of that project (http://drupal.org/node/191608), and reading through that writeup may help you get more from the session.

If there are specific questions on other aspects of the site, we'll obviously be able to answer those as well. The hopeful aim of this presentation is to pass along at least some little tip or trick to everyone who sits through it.

Drew

Comments

Meeting Notes

dgorton's picture

Here are the notes we worked off of for last night's presentation. Figured I'd post 'em as long as they were written up. Feel free to ask further questions!

Principles / World View

  • Simpler = Better
    • Fewer modules
    • Less restrictions, less rules
  • CSS is for presentation, not HTML (or PHP!)
    • Make logical/relational decisions with code and content types (and Drupal)
    • Make visual decisions with CSS
      (e.g. try not to touch page.tpl.php)
Project Background
  • Designed without thought for Drupal
    • That's OK - Drupal can be themed
    • ... as long as you ARE designing for users
    • and are open to suggestions or a dialog ("Is the exact position of element X really important? Or can it be here?")
  • Starting point - you've been asked to build something, you didn't make all the decisions that got you to that point
    (and may have not been around for the discussions that went into those decisions)
    • Frequent starting point...
  • Functionally, replace a mess of static html, Movable Type blogs, custom CMS (B-Swing) and another custom CMS (One Drupal to Rule Them All, no more duct-tape)
Drupal Template Structures
  • Only local images are allowed.So - where to start?
    (reference at http://drupal.org/node/191608)
    • Eight block regions across all pages
    • Open template.tpl.php - default_regions()
    • Open page.tpl.php - see examples, e.g. <?php print $right_bottom_left ?>
    • Admin > Build > Blocks (drop-downs now offer our choices)
  • Outer complexity is handled now ('just' setup the rules for each block)
  • Inner complexity and columns still need to be handled
    • This client decided on hard-and-fast rules for homepage
      • Panels?
      • CCK
      • Fewer modules is better... more control is better... so... CCK
    • Admin > Content management > Content types
      • Homepage = Title + Node Reference (multiple)
    • Open node-homepage.tpl.php
      • <?php echo _rake_get_section_features( $node->field_features, true ) ?>
    • Open rake_theme.inc
      • function _rake_get_section_features( $features, $homepage=false, $with_images=true )
  • Repeat, with variations, about 3,000,000 times
CSS - It's for Visuals!
  • Search - hit search 'submit' button with Firebug
    • Disable / enable styles
    • Open template.tpl.php - phptemplate_search_theme_form()
    • The overriding of Drupal Forms API approach confuses/disturbs me. (e.g. HOWTO: Create image submit button)
Utility Modules Released for Project
  • Backup and Migrate -
    http://drupal.org/project/backup_migrate
    • Admin > Content management > Backup and Migrate
    • Look through settings, options
    • Like it? Buy Ronan a beer!
  • Node Hierarchy -
    http://drupal.org/project/nodehierarchy
    • Admin > Site configuration > Node Hierarchy
    • Look through settings, options
      • Find bit of content - look at 'Child' tab
      • Edit content - Node Hierarchy section
    • Like it? Buy Ronan a beer!

Drew Gorton
Gorton Studios

Twin Cities

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: