Image-Link on Category-Blog Articles

Start-up Joomla template with amazing CSS3 animated icons, price tables and parallax effect background.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jun 25, 2014 8:45 am
Reply with quote
Report this post
Is there a chance to get links to the article on the images in a Category-Blog list?

There are links on the headline and the "read more" links also to the article. It would very good if the picture shown in the list would also have these links so that they are clickable.

Any help appreciated! THX.

See example there: http://www.indiwan.de/index.php/analytics
User avatar
Fresh Boarder

GK User
Wed Jun 25, 2014 8:55 am
Reply with quote
Report this post
This is core Joomla view so there is easy way to customize it but it require changes in override view. Single item view in category blog view you will find in root/templates/gk_simplicity/html/com_content/category/blog_item.php

Code which display image looks like here :

Code: Select all
<?php  if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
   <div class="img-intro-<?php echo $images->float_intro ? $images->float_intro : $params->get('float_intro'); ?>">
      <img
         <?php if ($images->image_intro_caption):
            echo 'class="caption"'.' title="' .$images->image_intro_caption .'"';
         endif; ?>
         <?php if (!empty($images->image_intro)):?>
            style="float:<?php echo  $params->get('float_intro') ?>"
         <?php else: ?>
            style="float:<?php echo  $images->float_intro ?>"
         <?php endif; ?>
         src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/>
   </div>
   <?php endif; ?>


And you need to replace it with :

Code: Select all
<?php  if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
   <div class="img-intro-<?php echo $images->float_intro ? $images->float_intro : $params->get('float_intro'); ?>">
      <a href="<?php JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>"><img
         <?php if ($images->image_intro_caption):
            echo 'class="caption"'.' title="' .$images->image_intro_caption .'"';
         endif; ?>
         <?php if (!empty($images->image_intro)):?>
            style="float:<?php echo  $params->get('float_intro') ?>"
         <?php else: ?>
            style="float:<?php echo  $images->float_intro ?>"
         <?php endif; ?>
         src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/></a>
   </div>
   <?php endif; ?>
User avatar
Platinum Boarder

GK User
Wed Jun 25, 2014 9:08 am
Reply with quote
Report this post
Thanks for that quick help. I implemented the changes and now the images do have a link - but not to the corresponding article. Alle images now link the homepage...
User avatar
Fresh Boarder

GK User
Wed Jun 25, 2014 9:23 am
Reply with quote
Report this post
The read more is enabled in this view? Could you provide me URL to this view? Please shorten URL if you can't post it in public forum but don't use PM if it is possible.
User avatar
Platinum Boarder

GK User
Wed Jun 25, 2014 9:27 am
Reply with quote
Report this post
Sorry, I posted the wrong URL at my first post. The URL is http://www.indiwan.de/index.php/analysis
(what do you mean with "...don't use PM..."?)
THX!
User avatar
Fresh Boarder

GK User
Fri Jun 27, 2014 12:41 pm
Reply with quote
Report this post
Issue solved. I just switched to K2-items for the pages and category stuff – everything works out fine now.

Thanks for the support.
User avatar
Fresh Boarder

GK User
Mon Jun 30, 2014 8:47 am
Reply with quote
Report this post
Yes K2 category view is different that the Joomla one but the custom changes in default category view don't help?
User avatar
Platinum Boarder

GK User
Mon Jun 30, 2014 5:46 pm
Reply with quote
Report this post
Nope, it did'nt help. The images got a link, but only one which leads directly to the homepage. They did'nt link to the specific article...
User avatar
Fresh Boarder

GK User
Wed Jul 02, 2014 10:29 pm
Reply with quote
Report this post
You want to modify default category blog of featured articles view? The code in this area is a just copy/paste of readmore link so it should work without any problems.
User avatar
Platinum Boarder


cron