Text on image float over

  • Posts: 27
  • Thank you received: 0
13 years 1 month ago #11247

Hello

Is it possible to make the image title / description appear on floatover of the image?

Thanks
Mark

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
13 years 1 month ago #11248

Hi,
It might be possible with some CSS. Could you give more information regarding what you want to do ?
Do you have a link to the page where you want that ? What kind of float over would you like (maybe you could upload an image of what you want?)?

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

  • Posts: 27
  • Thank you received: 0
13 years 1 month ago #11266

Hi Nicolas

The site is www.nazarethgifts.co.uk/

I would like a short piece of text to appear on mouseover of an image. When I add an image there is the option to add a description, and it is this description that I would like to appear.

So, on the Pamper page, for example, as I look at the products, I want to be able to mouseover and read the brief description without having to go to the individual product page.

Thanks
Mark

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
13 years 1 month ago #11270

To do that, please go in the menu Display->Views and edit the file listing_img_title of the view product of your template. There, change the line:
<a href="<?php echo $link;?>">

to:
<a href="<?php echo $link;?>" title="<?php echo $this->escape(strip_tags($this->row->product_description)); ?>">

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

  • Posts: 27
  • Thank you received: 0
13 years 1 month ago #11271

Brilliant! Thanks! Have just upgraded that site to HikaShop Business too :)

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

  • Posts: 1
  • Thank you received: 0
11 years 2 months ago #88574

Works great! Is there a way to truncate this text so that it shows only the part of the description before the readmore tag?

Thanks!

FOUND THE ANSWER:
<a href="<?php echo $link;?>" title="<?php echo $this->escape(strip_tags(preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description))); ?>">

Last edit: 11 years 2 months ago by jakabistvan.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum