Hi,
For the top toolbar icons(Primary Links) I'm using names with characters other than standart Ascii. As far as I know, in style.css file it's not posible to use non-ascii characters. Is there a way to use names with utf-8 for menu items and set icons for them?
Thanks.

Comments

Gurpartap Singh’s picture

Status: Active » Fixed

You can change the $cssid in function aquasoft_primary_links() in template.php to something that is compatible to type in your css file and unique for each menu item. Another trick that might work can be:

function aquasoft_primary_links() {
  $links = menu_primary_links();
  if ($links) {
    foreach ($links as $key => $link) {
      $link = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']);
      $cssid = $key;
      $output .= '<li id="'.$cssid.'">' . $link . '</li>';
    }; 
    $output .= '</ul>';
  }
  return $output;
}

$key will be unique (hopefully) per link. Expectedly it'll be a number, if else case, it would still be unique. if they are spaced key names then you might want to use: $cssid = str_replace(' ', '_', strip_tags($key)); on the respective line instead. Hope this helps.

Gurpartap Singh’s picture

Also to mention, test the code and note the $key value for each of them and use in your css (example replace li#Administer by li#123, where 124 can be the $key value per menu item).

Anonymous’s picture

Status: Fixed » Closed (fixed)