Nick Lewis: Overriding Themeable Drupal Functions

I have to admit something. Before today I had never visited Nick Lewis' blog. However, I'm extremely impressed with the how-to content on his site. I'm sort of known to be theme development "challenged", so I look forward to articles such as the one I'm reading now.

The following is an excerpt of his latest article with regards to theming in Drupal using the PHPtemplate engine:

I have good news and bad news. The good news is that overriding theme functions is easy. The bad news is that every theme function is different, and there isn’t a standard proceedure of going about it — and its very easy to accidently do something ugly, or foolish if you don’t know what you are doing.

Moreover, I suspect that the very inventor of PHPtemplate (a buddy of mine) may not have imagined the diverse ways it can be used. So, in the next few tutorials, we are going to explore the hows, whys, why nots, and what ifs of overriding theme functions. Each of these functions will present a different set of challenges, and opportunities to do something stupid, etc. Today’s lesson is “Building a better node form”.

Tags

Advertisement