joomla3.0 - Linking intro image in Joomla 3.3.1 -
i turn intro images on blog layout links articles read more does. found post here: joomla 3.1 intro image read more link
the solution here replace code in default_item.php this:
<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); ?>"/>
to this:
<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>
followed instructions, added override folder in template, copied default_item.php , made alter code. nil happened. tried alter same lines in component folder see if problem template override, nothing.
is there way of doing this?
thanks in advance,
guy.
default_item.php used part of featured articles view. if using blog view, files appear under com_content/views/category/
the image generated under com_content/views/category/blog_item.php on line 35
<?php echo jlayouthelper::render('joomla.content.intro_image', $this->item); ?>
change (via template override)
<a href="<?php echo jroute::_(contenthelperroute::getarticleroute($this->item->slug, $this->item->catid)); ?>"> <?php echo jlayouthelper::render('joomla.content.intro_image', $this->item); ?> </a>
joomla joomla3.0
No comments:
Post a Comment