Copernican Theory Posted September 26, 2016 Share Posted September 26, 2016 (edited) Hiya I wanted to shorten the text in my top menu buttons so I added links to my categories instead. For example: in my Categories I might have Solar Cat Launchers, but that's too long for a button - so instead I created a link to the same page in the Top Menu (a button) and renamed it Cat Launchers to save a bit of room. Now I'd like to add some description text (meta?) for mouse-over. My categories have description text that shows in the cats on the left menu , but not in the top. How can I do this? I searched the forum but gave up going back several pages to 1839 or something. I really do love this PrestaShop! My store is looking better each day - my biggest competitor's site is gonna look like a pile of goo compared to mine ha ha - and he paid big $$ for his oh yeah : PS 1.6.1.7 Default Theme with changes made by me Edited September 26, 2016 by Copernican Theory (see edit history) Link to comment Share on other sites More sharing options...
Simonas Invertus Posted September 27, 2016 Share Posted September 27, 2016 Top menu depends on the theme you are using so it is hard to comment anything. Is it possible - Yes, but most likely you will have to write some code. Link to comment Share on other sites More sharing options...
Copernican Theory Posted September 27, 2016 Author Share Posted September 27, 2016 (edited) I'm using PrestaShop 1.6.1.7 with the default theme with some changes made by me. The button(s) I've created via links already have a mouse-over description but it's just a repeat of the name of the button link. Here's a screenie The screen cap didn't capture the cursor. There must be a way to change that to something like 'Click here to view my blog' or such. Would this be in the Top Menu CSS? I ain't afraid of no code. Well,, maybe a little Edited September 28, 2016 by Copernican Theory (see edit history) Link to comment Share on other sites More sharing options...
Simonas Invertus Posted September 28, 2016 Share Posted September 28, 2016 That thing which you have in screenshot is called title. <a href="prestashop1610/en/5-tshirts" title="T-shirts">T-shirts</a> This is menu code sample from my shop. If you change what is written in title you will have what you want. I do not know how to change it, maybe somebody with more coding experience could help you. Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2016 Share Posted September 28, 2016 top menu generates title tag in <a> automatically based on the name of category / link / manufacturer etc. to alter this - you have to change blocktopmenu.php file and add wanted text there for example, change code: $this->_menu .= '<li><a href="'.Tools::HtmlEntitiesUTF8($link[0]['link']).'"'.(($link[0]['new_window']) ? ' onclick="return !window.open(this.href);"': '').' title="'.Tools::safeOutput($link[0]['label']).'">'.Tools::safeOutput($link[0]['label']).'</a></li>'.PHP_EOL; to: $this->_menu .= '<li><a href="'.Tools::HtmlEntitiesUTF8($link[0]['link']).'"'.(($link[0]['new_window']) ? ' onclick="return !window.open(this.href);"': '').' title="'.$this->l('Click to see ').' '.Tools::safeOutput($link[0]['label']).'">'.Tools::safeOutput($link[0]['label']).'</a></li>'.PHP_EOL; with this modification i added '.$this->l('Click to see ').' to title="" Link to comment Share on other sites More sharing options...
Copernican Theory Posted September 28, 2016 Author Share Posted September 28, 2016 That does indeed do what I asked and I thank you most heartily. However, this affects all the buttons. And while it is nicer than it was, it's not really what I had in mind. It's a bit repetitive. What I SHOULD have asked is; Is there a way to change those titles (hover text) individually for each button? What I imagined was some code somewhere that would look sort of like this over-simplified example: NOW: Button Label = "Blog", description = (just copy button label). Edited to: WANT: Button Label = "Blog", description = (insert whatever colorful descriptive text I want). And each button would have it's own lines of code to edit specifically for that button. The way it's set up now is that some of the buttons inherit the category's changeable descriptive hover text capabilities while my other link-buttons do not have this option. Just hoping there's a way without having to change a boatload o' code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now