Community & Support

Replacing $primary_links with images and still have secondary_links display expanded

I'm trying to replace the $primary_links with images in the Mollio theme and still have the secondary_links dropping down. Any ideas? So far, I have the following:

<!-- menu -->
<?php if(is_array($primary_links)) : ?>
<ul id="nav">
<?php
      $l2i
['pattern'] = '$(<a.*>)(.*)(</a>)$ie';
     
$l2i['themepath'] = url($directory);
     
$l2i['replacement'] = "\"\\1\".'<img src=\"$l2i[themepath]/navbutton_'.strtolower('\\2').'.gif\" alt=\"\\2\">\\3'";
      foreach (
$primary_links as $link) {
        print
"<li>".preg_replace($l2i['pattern'],$l2i['replacement'],$link)."</li>\n";
      }
      unset(
$l2i);
     
?>

</ul>
<?php endif; ?>
<!-- end menu -->

It works fine, except I'm not sure how to get the secondary_links to plug in. Any ideas?

Comments

Can't seem to find a way to

Can't seem to find a way to display all secondary links. Only active ones show.

That's the purpose of

That's the purpose of secondary links: They only show up if the parent primary link is activated. If you don't want it that way, you've to build your own theme functions in template.php.

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
unleashed mind

images in menu bar

Hi, I'm a newbie and I need to do the same. What would be the steps to make this change?

thanks

nobody click here