Created
October 1, 2017 17:59
-
-
Save dherbold/3a72c246f1f9f4c6423da310110ef294 to your computer and use it in GitHub Desktop.
Various pre processess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Primary pre/preprocess functions and alterations. | |
*/ | |
function innovationchild_preprocess_page(&$variables) { | |
if (isset($variables['node']->type)) { | |
// If the content type's machine name is "my_machine_name" the file | |
// name will be "page--my-machine-name.tpl.php". | |
$variables['theme_hook_suggestions'][] = 'page__' . $variables['node']->type; | |
} | |
} | |
function innovationchild_preprocess_html(&$vars) { | |
$viewport = array( | |
'#tag' => 'meta', | |
'#attributes' => array( | |
'name' => 'viewport', | |
'content' => 'width=device-width, initial-scale=1, maximum-scale=1', | |
), | |
); | |
drupal_add_html_head($viewport, 'viewport'); | |
} | |
/* function innovationchild_preprocess_panels_pane(&$variables) { | |
//dpm('type: ' . $variables['pane']->type); | |
if ($variables['pane']->type == 'fieldable_panels_pane') { | |
dpm('subtype: ' . $variables['pane']->subtype); | |
} | |
}*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment