Closed (fixed)
Project:
Zen
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
17 Apr 2008 at 17:04 UTC
Updated:
5 May 2008 at 12:51 UTC
Zen already has THEME_preprocess_HOOK() functions, but we missed the THEME_preprocess() function which allows you to insert variables into every template file.
Comments
Comment #1
johnalbinCommitted to DRUPAL-5--1.
Comment #2
niklp commentedJohn,
is this an effective replacement for the generic _phptemplate_variables function? I noted that it was not possible to add variables to page/node/comment in 1.0 unless you did that separately - does this bring back the ol' classic case 'page', etc?
Do you have a quick example snippet...? :)
Thanks.
Comment #3
johnalbinJust to clarify for those playing at home, this change simply adds a
SUBTHEME_preprocess(&$vars, $hook)function to the STARTERKIT/template.php file. Drupal 6 has this preprocess function, so Zen should too.I hope not! The SUBTHEME_preprocess() function should only be used in the special case where you want to add the same variable to every template file.
You can see example code in the just released Zen 5.x-1.1. There’s also 1.0->1.1 upgrade instructions online.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.