directy VIP
Total posts: 51
26 Нояб 2015 15:54

Hi, is there a way to enter in a category by clicking on the category icon? thanks

marco

Последние изменения: 28 Нояб 2015


pepperstreet VIP
Total posts: 3,837
26 Нояб 2015 23:19

Hello Marco, I assume you are talking of the Category Index and the image from Options tab, right?


The default template has no parameter to configure such a behavior.
There is only show/hide image, AFAIK.
Good point though! Could be a useful feature ;)

I guess, you would have to copy/edit the default category index template.
Goto -> Cobalt -> Templates
Copy and rename the default index template.

Edit your copy and look out for this line:

<img class="category_icon" alt="<?php echo $category->title; ?>" src="/<?php echo $url;?>">

Wrap the image output with the following a-tag:

<a href="/<?php echo JRoute::_($category->link)?>">                                
<img class="category_icon" alt="<?php echo $category->title; ?>" src="/<?php echo $url;?>">
</a>

Make sure to set your new index template in YourSection -> General Parameters -> Templates
Also make sure to edit AND save template parameters once!

Hope this helps.


directy VIP
Total posts: 51
27 Нояб 2015 19:35

Thanks! it Works! marco

Работает на Cobalt