/ Published in: PHP
Implementation of phptemplate_preprocess. Enables that preprocess functions are in different files
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Implementation of phptemplate_preprocess() * * This function checks to see if a hook has a preprocess file associated with it, and if so, loads it. * * @param $vars * @param $hook */ function fremtidslaboratoriet_preprocess(&$vars, $hook) { //DEBUG //dpm($hook); $preprocessFunction = drupal_get_path('theme', 'fremtidslaboratoriet') . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc'; { include($preprocessFunction); //DEBUG //dpm($preprocessFunction); } }
URL: Implementation of phptemplate_preprocess. Enables that preprocess functions are in different files