lezergerichtschrijven.nl
Submitted by clemens on Tue, 2008/10/07 - 11:43am
This site was designed by http://fari.nl and it must look like this.
What troubled me was the icons next to a few menu items. I don't want to use primary links menu-ids for this because these vary between my development and test system. Yes I could try to fix this and rely on these but I like what follows more. I learned about this on #drupal-theme from John Albin was to modify template.php so I did this:
function lgs_preprocess_page(&$vars, $hook) {
if ($hook == 'page') {
foreach( $vars['primary_links'] as $key => $link) {
$class = $link['attributes']['class'];
if (empty($class)) $class='';
$title = $link['title'];
$class .= ' ' . implode('-', explode(' ', $title));
$class = trim($class);
$vars['primary_links'][$key]['attributes']['class'] = $class;
}
}
}
This solution is still not mature enough. Hope to solve it another way.Attachment | Size |
---|---|
lezergerichtschrijven28-05.jpg | 176.47 KB |