Hi,
I'm trying to figure out how to change the way the book thumbnail works.
Instead of opening a larger image of the book cover in a new window, I would like to open it in the assigned URL of the book item.
Is this possible? If so, what and where should I change in the code?
Thanks in advance,
Hi miguelcorreia,
in category view, book covers already open the book page, instead in the book view the cover opens a pupup image
Didn't you see it so as I wrote?
Hi, Federica, thanks for the reply.
I know what you mean. In the category list if I click the thumbnail it goes to the book item.
What I was looking for was a way to change the behaviour of the thumbnail in the item page, so instead of opening in a pop-up it would open in an external URL (the same as used in item description or book details)
I understood. You could use the external url field. You have to change the link of the image replacing it with the field external url.
Open the file /components/com_abook/site/views/book/tmpl/default.php line 86 from:
echo '<a href="'.$this->book->image.'"
style="cursor: pointer;" class="modal" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->book->title.'">
<img itemprop="image" class="img-polaroid" src="'.$this->book->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->book->title.'" />
</a>';
to:
echo '<a href="'.$this->book->url.'"
title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->book->title.'">
<img itemprop="image" class="img-polaroid" src="'.$this->book->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->book->title.'" />
</a>';
Thanks Federica. Works like a charm :)