Is there an accepted Alpha way for having specific preprocess versions for node types?
I understand (and appreciate!) how the various preprocess hooks get split out into the includes. In a lot of the projects I work on, THEMENAME_alpha_preprocess_node() can get fairly messy because of a lot of type-specific things going on. It would be helpful to be able to split this out into different functions, and preferable into other files.
Is the only real method something like
<?php
function MYTHEME_alpha_preprocess_node(&$variables) {
$node = $variables['node'];
$subhook = __FUNCTION__ . '_' . $node->type;
if (function_exists($subhook)) {
$subhook($vars);
}
}
function MYTHEME_alpha_preprocess_node_page(&$variables) {
$variables['foo'] = 'bar';
}
inside preprocess-node.inc? I looked at alpha_invoke() and it doesn't look like there is any other option, unless I am missing something.
If not, do you want a patch to have a special case for preprocess_node inside alpha_invoke()?