Changed Look and feel for Related items
- Posted by TemplatePlazza (5263) Offline
Hi, you just need to add the <a> tag for the image part on the default.php
find this code on the file (there's two position) :and change that to
7 years 10 months ago #7
by TemplatePlazza
find this code on the file (there's two position) :
<div class="image-feat">
<?php if ($link_to_item) { ?><a href="<?php echo $item->route; ?>"><?php } ?>
<?php
if ( $item->isIntroImage ) { ?>
<img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->image, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" />
<?php } elseif ( !$item->isIntroImage && $item->isFulltextImage ) { ?>
<img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->image, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" />
<?php } else /*if( empty($introImage) && empty($fulltextImage) && !empty($item->image) )*/ { ?>
<img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->firstImage, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" />
<?php } ?>
<?php if ($link_to_item) { ?></a><?php } ?>
</div>
<div class="image-feat">
<?php if ($link_to_item) { ?><a href="<?php echo $item->route; ?>"><?php } ?>
<?php
if ( $item->isIntroImage ) { ?>
<a href="/<?php echo $item->route; ?>" onclick="ga('send', 'event', 'Related_articles', ‘<?php echo $item->title; ?>', '<?php echo $item->title; ?>');"><img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->image, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" /></a>
<?php } elseif ( !$item->isIntroImage && $item->isFulltextImage ) { ?>
<a href="/<?php echo $item->route; ?>" onclick="ga('send', 'event', 'Related_articles', ‘<?php echo $item->title; ?>', '<?php echo $item->title; ?>');"><img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->image, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" /></a>
<?php } else /*if( empty($introImage) && empty($fulltextImage) && !empty($item->image) )*/ { ?>
<a href="/<?php echo $item->route; ?>" onclick="ga('send', 'event', 'Related_articles', ‘<?php echo $item->title; ?>', '<?php echo $item->title; ?>');"><img src="<?php echo rixtdResizeImageHelper::getResizedImage($item->firstImage, $thumb_width, $thumb_height, $thumb_option); ?>" alt="<?php echo $item->imgalt; ?>" title="<?php echo $item->imgtitle; ?>" /></a>
<?php } ?>
<?php if ($link_to_item) { ?></a><?php } ?>
</div>
Please Log in or Create an account to join the conversation.