/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Override or insert variables into the page templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered. */ function genesis_custom_preprocess_page(&$vars, $hook) { // Add page template suggestions based on path alias. $alias = drupal_get_path_alias($_GET['q']); if ($alias != $_GET['q']) { $template_filename = 'page'; $template_filename = $template_filename . '-' . $path_part; $vars['template_files'][] = $template_filename; } } }