Thanks for developing this great module. Not long ago I had almost the same idea but did not know how to write a Drupal module.
If this module would be able to work for block menu items, I would get rid of those poor-looking sidebar menus.
I would greatly appreciate if you would like to add this functionality.

Comments

wrunt’s picture

This should already be possible. If you override theme_menu_item (by defining a phptemplate_menu_item function in your theme's template.php), then you can set up a signwriter profile and use a call to theme('signwriter_text_convert', ...) to display each menu item.

sime’s picture

Quick hack (in page.tpl.php) for interests sake:

  $signwriter = signwriter_load_profile('profile_name');

  foreach ($primary_links as $link) {
    $signwriter->text = $link['title'];
    $url = signwriter_url($signwriter);
    $link_text = '<a href="/'. $link['href'] .'"><img src="'. $url .'"><span style="display: none">'. $link['title'] .'</span></a>';
    print '<li>'. $link_text .'</li>';
  }
kinaya’s picture

hi!

I am using signwriter module to display my menu items and the code above is working great. The only problem is that drupal is not adding an active-class to my menu using this method of displaying primary links. Anyone know how I can fix this?

thanks

agileware’s picture

Category: feature » support
Status: Active » Closed (fixed)

Original issue has been answered.

@kinaya: no idea buddy, sorry.

eMPee584’s picture

well, look how it's done in drupal core common.inc:

  // Append active class.
  if ($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) {
    if (isset($options['attributes']['class'])) {                             
      $options['attributes']['class'] .= ' active';
    }                                              
    else {                                         
      $options['attributes']['class'] = 'active';
    }                                            
  }