HandsOn Creating a Custom Theme

Let's look at how you can modify one of Drupal's themes to make it your own. There are many good themes that can act as a good "starter theme." The Drupal contributed themes repository (http://drupal.org/project/Themes) has several specifically designed for this purpose—the Zen theme (http://drupal.org/project/zen) is often recommended. For our example, we'll start with a simple core theme: Bluemarine, as pictured in Figure 11-5.

Superfantastic admin o My account

► Create content

► Administer o Log out

Refoveo node (story) - Ludus sagaciter sed importunus lobortis lobortis ratis damnum. Ad decet aliquip tation euismod esse. Defui quae vereor.

Feugiat abluo ratís veniam paulatim zelus abluo diam. Singularis odio qui gravis. Melior ea melior jus occuro odio. Esca eligo incassum mos nunc importunus acsi. Jugis exputo ideo vel saepius imputo. Velit damnum ioquor enim praemitto. Antehabeo luptatum tincidunt natu. Cui olim has abluo. Sudo decet esca gilwus melior. Commoveo roto tation distineo commodo velit lobortis verto hos ulciscor.

Zelus tation sudo ymo singularis dignissim. Jus decet quae.

» 20 comments Read more

Quibus Mos lor I rusvw wofririt | jaslowrowr | chofrasl collvimemuuo node (story) - Rusticus quadrum paratus secundum ulciscor nunc conventio. Quia vindico dignissim ratis laoreet. Nostrud mos ludus mos secundum. Ut at amet saluto nutus molior. Gemino amet ea incassum vindico. Sino duis huic erat su sei pit nibh meus sino ableo refoveo. Interdico macto brevitas vulputate oppeto ullamcorper tum causa laoreet vero. Hendrerit fere amet pecus olim haero duis saluto bene aliquam.

laceo abbas commodo odio nunc appellatio vicis vindico melior. Jumentum nulla tation roto accumsan ex luctus jumentum sit. Jus paulatim ex esca virtus quis laoreet fere praesent.

» 20 comments 20 new comments Read more

Venio Suscipit Ullamcorper Suscipere Causa Eum Iusto

Submitted by padarevi on Sat, 'Jb.."J3y¿aüB W .i'¿

node (story) - Camur praemitto abico iriure ilium. Tamen iusto lenis plaga appellatio quidne occuro tamen esca. Vero ilium proprius abico metuo melior nulla dolore. Vindico magna tation probo huic dolus

Figure 11-5. The Drupal core Bluemarine theme

Bluemarine was Drupal's default theme prior to Drupal 5. It uses a table-based layout, which is generally considered bad practice in these days of CSS-based layout techniques. However, for the purposes of our example, it makes for a simple and clean starter theme. Let's see what we can do to customize it.

Figure 11-6 shows the Bluemarine theme directory. It contains template override files for blocks, boxes, comments, nodes (all types), and the page. There are images for the default logo and a screenshot for the theme listing page. The required .info file is there. The main stylesheet for the theme is called style.css and there's another sheet called style-rtl.css that gets called in when Drupal is displaying right-to-left languages such as Arabic or Hebrew.

D block.tpl.php D blue marine, info D box.tpl.php D comment.tpl.php i logo.prig D node.tpl.php D page.tpl.php [Si screenshot.png 7 style-rtl.css 13] style.ess

Figure 11-6. Bluemarine theme files

Was this article helpful?

0 0

Post a comment