The last couple of weeks I've had the pleasure to work together with the people of F1World. Apart from a namechange (dutch article), they needed a complete make-over of their site, and an alternative for their CMS pMachine. I opted for the open-source, free, and very scalable CMS Drupal. Today, the new site has gone live, proudly presenting the new F1Journaal.be.
Themeing: some tweaks
The hardest nut to crack, would prove to be the themeing of the layout. As you can see, not only did they opt for both a horizontal and vertical block style, but also a mix of both one- and two-spanned table-look. Each header, both on the top as on the lower right, is a seperate block. To come over this, I choose not to go with Smarty templates, but to code this straight in Drupal's PHP engine, PHPTemplate's predecessor. This allowed the administrators to edit each block seperatly, while granting them a custom, but static design.
Another small adjustment was the division of the stories on the index by date. This can be done in three little lines of code. First create a global variable in the main function (page.tpl.php), for instance
<?php
$date_news="X";
?>The following code should be placed in the _node function, or node.tpl.php.
<?php
if (date("d",$node->created) != $date_news) {
$output .= date("d F", $node->created);
$date_news = date("d",$node->created);
}
?>Another tweak would come with the image module. Once on the page with the actual image, breadcrumb would send you back to the taxonomy page instead of the image module's gallery. This can be easily done, again, in the _node function or node.tpl.php.
<?php
if ($node->type == "image") {
$output .= str_replace("taxonomy/term","image/tid",theme("links", $taxonomy));
}
else {
$output .= theme("links", $taxonomy);
}
?>Normally I would have used Drupal forum with the sports newspaper in Belgium.
Find out how to do database migration from pMachine to Drupal in my next Drupal article.
Tweet
Comments
Post new comment