Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: library_addict on 12 June 2014, 13:14:46

Title: Direct link to file or external link
Post by: library_addict on 12 June 2014, 13:14:46
Hello!

So I can already directly link a book to its file as stated here:
http://forum.voxpopulix.org/supporto-%28support%29/direct-link-to-a-book/msg1984/#msg1984

But what I need is: if a book has a file, clicking on its name will direct me to the file. if it doesn't have a file but has a link, clicking on the book's name will direct me to the link. if it does not have both, there will be no link.
Title: Re: Direct link to file or external link
Post by: federica on 14 June 2014, 17:07:27
Hi library_addict,
I understand. Would you like this behavior in the category view?
Title: Re: Direct link to file or external link
Post by: library_addict on 14 June 2014, 20:20:54
yes. also in the search results. thank you!
Title: Re: Direct link to file or external link
Post by: federica on 25 August 2014, 10:40:58
You have to modify two files:

your_site/components/com_abook/views/category/tmpl/default_items.php line 87
from:
<?php $linkbook=JRoute::_(AbookHelperRoute::getBookRoute($item->slug$item->slugcat));?>

to:
<?php $linkbook=$item->image;?>


your_site/components/com_abook/views/search/tmpl/default_items.php line 40
from:
<?php $linkbook=JRoute::_(AbookHelperRoute::getBookRoute($item->slug$item->slugcat));?>
to:
<?php $linkbook=$item->image;?>