file How can I use tooltip for menu items in joomla default menu module

More
9 years 2 months ago #6073 by Clemens
Hi!
I am new here, and I am not familiar with PHP or JS coding. I want to use Joomla standard menu module, because of its simplicity and because the visitor knows at every moment, to which menu item the page belongs, which he is just watching.
But some menu items would need more text, to let the visitor know in advance, waht he will get, when he clicks it. I would like to have a hover on each menu item, showing up a very short description.

On my search I have discovered this description where the code of the modul is changed in order to show a title tag at each menu item. But of course, the hover of the title tag does not look very nice!

So I thought, it should be possible to pass the text of the title text in the menu item to pure CSS-tooltip and let it show up in the tooltip. But I am not able to code this by myself.
I have searched all the Joomla extensions and did not find a menu module, which can do such a simple hover without using JS or flash or something else.
I have started a discussion about this here and the ideas, I have written here, are a result from this discussion.

I like simple things and that is the charme of your pure CSS tooltip and I like it!

So my question: Does anybody know a solution for this and wants to share it with me?

Kind regards
Clemens

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6078 by carsten888
that is not possible with the normal Joomla menu module. The menu-module has no events or anything that can be made to work with any other extension. The alternative would be to create a template-override for mod_menu (or mod_mainmenu on Joomla 1.5), to override the menu-item title output. Then you probably run into a load of css-layout conflicts, but if you are a good frontend coder, that could maybe be solved. Having said that, you would still need a way to enter the tooltip itself and to let the system know there is a tooltip for the menu-item, and there is none in the menu-item properties which can be used for this.

So your best alternative to get this working would be a javascript-based tooltip which can be triggered by adding a menu-item class.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6080 by Clemens
Hi!
Thank you very much Carsten. I agree, that ther should be a module override. Because of that fact, I have referenced the link to the description, how someone has included the title tag. They place a copy of regular Joomla mod_mainmenu in the template folder and Joomla system will look up for that module in this place at first and not take the regular one.
In the copy of that mod_mainmenu, they have added some PHP request which takes the text of the menu item title, which can be added in the meu item configuration.

My idea is: If they have already done the PHP code so far, that they have access to the menu item title text, then it should be possible from that point on, to insert the text in the code of the CSS tooltip. Or to say it the other way around: If part of the CSS tooltip code would be inserted at that point, where they had got the text of the menu title tag, then it could be perhaps possible, to let it show within the CSS tooltip.

I know, that there are countless numbers of user ready menu modules out there. And they have too many features, which I do not want nor need - and they are very complex with their coding. Often it is not possible, to switch off the additional features I do not want. And all that complexity for only to get this tooltip feature working on mod_mainmenu!!!

That's the reason, why I came to the idea, to combine the module override with the title tag with your CSS tooltip.

What about the idea, to define a background image for each menu item (text of the menu item is on top) and let this image be the link for the CSS tooltip?

You have advised me:

So your best alternative to get this working would be a javascript-based tooltip which can be triggered by adding a menu-item class.

Sorry, but I cannot understand the consequences which will arise from this for my menu project. As I said: I'm not familiar with all that coding (JS PHP etc.)

Kind regards
Clemens

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6081 by carsten888

What about the idea, to define a background image for each menu item (text of the menu item is on top) and let this image be the link for the CSS tooltip?

then the container of the menu-item has a classname you can work with. But the tooltip itself needs to be in that container as well (as highly conflictable html), because this is a pure css tooltip. With a javascript based tooltip, jquery would be able to get the containers by classname and manipulate the html and css to turn it into a tooltip. With just css I just don't see this happening.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6082 by Clemens
OK, thank you very much!
As a conclusion out of all that, it seems, that I should find someone, who can code that for me.

The information, you have given to me here in the forum should be a gould starting point, because I would not have enough knowledge to find the rigth words to explain to a script specialist, what I want to achieve.

So you have helped me with your answers and I thank you for your patience and your engagement!

Have a nice day!

Clemens

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum
 
spicy-sacerdotal