Created
February 26, 2012 06:09
-
-
Save psynaptic/1914164 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Override or insert variables into the page templates. | |
* | |
* @param $variables | |
* An array of variables to pass to the theme template. | |
*/ | |
function clean_liquid_preprocess_page(&$variables) { | |
if (isset($variables['attributes_array']['class'])) { | |
$variables['attributes_array']['class'] = $variables['body_classes'] .' '. $variables['attributes_array']['class']; | |
} | |
else { | |
$variables['attributes_array']['class'] = $variables['body_classes']; | |
} | |
if (!empty($variables['skip_link']) || !empty($variables['primary_links_themed']) || !empty($variables['secondary_links_themed']) || !empty($variables['breadcrumb'])) { | |
$variables['navigation'] = TRUE; | |
$variables['attributes_array']['class'] .= ' with-navigation'; | |
} | |
else { | |
$variables['navigation'] = FALSE; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment