Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • richnyc30 Friend
    #196308

    I would like the code to link the image in Category blog to the article for Argo template. The other forum entries are about other templates that have different code in blog_item,php

    Saguaros Moderator
    #528876

    You can achieve that by customizing a bit in blog item : templatesja_argohtmlcom_contentcategoryblog_item.php


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
    <?php endif; ?>

    replace it with:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"><img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/></a>
    <?php endif; ?>

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 10 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum