Created
September 29, 2014 15:17
-
-
Save mkorostoff/307fc4be4cf10b87079c to your computer and use it in GitHub Desktop.
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
<?php | |
function radius_theme_theme() { | |
$items = array(); | |
$items['authed_menu'] = array( | |
"render element" => 'links', | |
'path' => drupal_get_path('theme', 'radius_theme') . '/templates', | |
'template' => 'authed-menu', | |
); | |
$items['unauthed_menu'] = array( | |
"render element" => 'links', | |
'path' => drupal_get_path('theme', 'radius_theme') . '/templates', | |
'template' => 'unauthed-menu', | |
); | |
return $items; | |
} | |
function radius_theme_preprocess_page(&$vars) { | |
$vars['settings_menu'] = menu_tree('menu-settings'); | |
if (user_is_logged_in()) { | |
$vars['settings_menu']['#theme_wrappers'][] = 'authed_menu'; | |
} | |
else { | |
$vars['settings_menu']['#theme_wrappers'][] = 'unauthed_menu'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment