Make changes to page with preprocess page in module
This is how you can make changes to a page view with preprocess page hook from your module
<?php
function support_bulk_preprocess_page(&$variables) {
//Print out to see all variables
?>
<pre>
<?php
print_r($variables);
?>
</pre>
<?php
exit;
if ($variables['node'] && arg(2) != 'edit') {
$variables['template_files'][] = 'page-'. $variables['node']->type;
}
if ($variables['node']) {
$variables['body_classes'][] = 'page-'. $variables['node']->type;
}
}
?>Knowledge keywords:
