Re: [themes] although it’s a very powerful CMS, I didn’t have the greatest time with it as it came to be one of the most cumbersome and roundabout pieces of software...

Adrian Rossouw adrian at bryght.com
Wed Jun 14 16:42:10 UTC 2006


On 14 Jun 2006, at 6:08 PM, Kieran Lal wrote:

>
> Sounds like a thoughtful approach.  But also sounds like more a re- 
> engineering than an attempt to meet the need of these designers  
> trying to design with Drupal for the first time.
>
> Can you elaborate on "help to find themeable components.  Those  
> which make sense should be migrated to mainly html"?
>
Instead of finding theme functions in the code.. to override anything  
you just go :
cp modules/event/event.tpl.php themes/mytheme

Overriding any template no longer requires any knowledge of php. It  
is literally just copy and edit.

Instead of having the code in the format of :

function theme_block($block) {
   $output  = "<div class=\"block block-$block->module\" id=\"block- 
$block->module-$block->delta\">\n";
   $output .= " <h2 class=\"title\">$block->subject</h2>\n";
   $output .= " <div class=\"content\">$block->content</div>\n";
   $output .= "</div>\n";
   return $output;
}

Contained inside a file filled with other source. It is instead just :

<div class="<?php print "block block-$block->module"?>" id="<?php  
print "block-$block->module-$block->delta"?>">
   <h2><?php print $block->subject?></h2>
   <div class="content"><?php print $block->content ?></div>
</div>

Because of this, we can also write a _proper_ inline theme editor.  
Something which was possible up to now.



--
Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com




More information about the themes mailing list