preprocess functions
Avoiding Loops In Preprocess Hooks
Submitted by greg.harvey on Thu, 02/07/2009 - 18:55I've just released a new module (fanfare) which seems to work pretty well. I have a couple of silly bug fixes to put up tonight (knew I should've called it "beta") but other than that it works great. It's called Node Reference Variables:
http://drupal.org/project/nodereference_variables
All it does is present a load of stuff (depending on other contrib modules installed and some admin options) via the hook_preprocess_node() preprocess hook for themers to use to do cool theming stuff with Node Reference CCK fields. Main feature I'm using is the jQuery UI tabs it provides.
The Joys Of Preprocessing
Submitted by greg.harvey on Tue, 23/09/2008 - 11:37I've been having a lot of fun with preprocess functions in Drupal 6.x, particularly when theming Views. It's a great system, but my colleague came across a nice "gotcha" this morning.
We have been adding JavaScript in Views preprocess functions if we want to provide tidy jQuery interfaces for Views output. This works great, so we thought nothing of doing the same for pages, which is where we came unstuck.
To understand why, you need to understand the process order of preprocess functions, as defined here:
http://drupal.org/node/223430

