Created
October 22, 2013 09:25
-
-
Save vladdancer/7097657 to your computer and use it in GitHub Desktop.
Add tpl based on delta name.
This file contains hidden or 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
function yourtheme_preprocess_page(&$vars) { | |
$contexts = context_active_contexts(); | |
// Add delta based tpl. | |
foreach ($contexts as $context) { | |
if (isset($context->reactions['delta']) && ($delta_name = $context->reactions['delta']['delta_template'])) { | |
$vars['theme_hook_suggestions'][] = 'page__'. $delta_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment