I am looking for a way to make drupal menus look a bit better.
So I was wondering
Could RepTags be used inside of a menu item??? And if yes how?
Thank you in advance

Comments

profix898’s picture

Category: task » support

I am looking for a way to make drupal menus look a bit better.

Can you explain this a little more. What are you trying to do exactly? In principle you can use reptag to replace tags in almost every location. The problems with menu items are: 1. there is no hook to alter menu items on the fly and 2. most menu items are cached and cant be changed dynamically. However you can use reptag in a custom module to create menu items which contain replacement tags, of course. But there will be no out of the box solution to 'reptag' menu items!

palazis’s picture

Thanks for the very fast answer!
I am sort of new in drupal so sorry if i didn't make myself clear...
What I am trying to do is create a menu with images instead of text.
Can I really use reptag to replace tags in almost every location??? In menus too? Not only in nodes?
What would be an "out of the box solution" (sorry for my english!) and could I create a custom module
without lots of programming experience?
Thank you

profix898’s picture

AFAIK you cant use images as menu items with the menu.module, because html is not allowed in the item titles. I think you will need to handle this on the theme layer (using phptemplate). You should post to the forums to get more help on this.

For more information on how to use reptag in your custom php code you should read developer.txt. Basically you need to call reptag_replace() on your text:

$text = 'text with a $tag$ inside';
$text = reptag_replace($text);
echo $text; // $tag$ is replaced now

I will be happy to help you with issues regarding reptag, but you should first ask at the forums for help on the basic problem ...

profix898’s picture

You may want to take a look at http://drupal.org/node/110199

palazis’s picture

thank you very much, this is what I want - it works fine with the navigation menu.
i guess i need another trick to use for the PRIMARY LINKS menu now...

profix898’s picture

... what about http://drupal.org/node/62149 ...

profix898’s picture

Status: Active » Closed (fixed)

Please reopen or submit a new request if you need more help ...