Hey guys,
In the past i've just used jQuery to stuff some purely aesthetic divs inside my main menu, but I'm trying to do things right! I'm building a template out, and here is my current main menu call in page.tpl :
<?php print theme('links__system_main_menu', array(
'links' => $main_menu,
'attributes' => array(
'id' => 'main-menu',
'class' => array('links', 'inline', 'clearfix'),
),
'heading' => array(
'text' => t('Main menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
)); ?>
Now, I wanted to add span tags to each list item title. so in template.tpl
function colorblinddesigner_preprocess_page(&$variables) {
global $theme_path;
foreach ($variables['main_menu'] as $key => $value) {
$variables['main_menu'][$key]['html'] = TRUE;
$variables['main_menu'][$key]['title'] = '<span class="rockwell_regular">'. $variables['main_menu'][$key]['title'] .'</span>';
}
}