theme

Overriding a template file (.tpl.php) from a module

There are many times when a custom module provides functionality that requires a tweaked or radically altered template file, either for a node, a field, a view, or something else.

While it's often a better idea to use a preprocess or alter function to accomplish what you're doing, there are many times where you need to change the markup/structure of the HTML, and modifying a template directly is the only way to do it. In these cases, if you're writing a generic custom module that needs to be shared among different sites with different themes, you can't just throw the modified template into each theme, because you'd have to make sure each of the sites' themes has the same file, and updating it would be a tough proposition.

I like to keep module-based functionality inside modules themselves, so I put all templates that do specific things relating to that module into a 'templates' subdirectory.

Full Site Buildout: Part 4 - Releasing a Theme on d.o!

Part 4 of a series: Building out a full Drupal site in a weekend.

Well, after having a successful launch day, ironing out a few small bugs in the CSS of the layout, and patting myself on the back, I decided to push the initial release of the 'Airy Blue' theme created for Open Source Catholic out to Drupal's Theme repository. It turns out working with CVS isn't the hell-on-earth I thought it would be, but it's still a heckuva lot to expect from a guy who logs less than an hour a day in a command-line interface!

I applied for a CVS account, then read through the plentitude of CVS documentation for themers on drupal.org, making a few notes here and there. After having my CVS account approved, I finally had some time to fire up Terminal, and go through the process of first 'checking in' to CVS, then uploading my theme directory, and finally 'committing' and 'tagging' it for release on my project page.

>> It's a lot easier to zip up the files and link to them, let me tell 'ya! <<

Anyways, enough about that process (if you ever need help, jump into the #drupal IRC channel and see if webchick's around. If she is, she'll help you in no time!); here's the description of Drupal's newest contrib theme, Airy Blue:

Closer, Ever Closer, to Pure-CSS Bliss in Drupal

Today I contributed my first 'original' piece of content to Drupal: a handbook page entitled Create a CSS-Only Theme. Since the first time I heard about the Stark theme (a Drupal theme which does nothing but expose all the 'stark' html output of Drupal core), I've been thinking of ways to enable designers to quickly build out unique and beautiful themes for Drupal. In Drupal 7, I think this will be a reality. (And maybe, just maybe, I'll create a theme for inclusion with Drupal 7 in the next few months).

On the State of Drupal Themes and Theming

I was browsing the Drupal Theme Garden a few days ago and was reflecting on how incredibly boring (if not ugly) a large share of the themes looked. Out of all the themes I viewed (over 50), I might consider using only 10 or so on a production site for a quick project that I didn't want to create a theme for.

 No - Yes - Drupal Designs Evaluated

Later on, I read this post on Steven Witten's blog [Acko.net] from 2007, and read through every single comment, because I am extremely interested in the issue of Drupal theming. If you are at all interested in helping Drupal be more themeable and appealing to designers, you must read the post linked to above. Go ahead - read it. I'll wait...

...okay, now that you're back,

A few of the comments in Steve's blog post deserve a mention...

From the blog posting itself: "Not enough Drupal people are savvy enough about theming and design to help out with even small tasks (like a banner) or even give quality tips and feedback on other work. The result is that theming and design receives little attention. Most contributed themes and sites could look a lot better, if they just themed it some more. And getting patches into core that give the defaults a little more oomph is tough, as they are often considered to be useless embellishments.