Take the 2-minute tour ×
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It's 100% free, no registration required.

While trying to override the way the intro images are displayed in blog layout (I want to add a class to the images), I run into this code in templates/MYTEMPLATE/html/com_content/category/blog_item.php:

<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>

What's the best/correct way to override this and control how my intro-images are displayed?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You would want to match the path that you send as the first parameter within your template at templates/*your_template*/html/layouts/

So in the example you listed of <?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?> copy the file currently at layouts/joomla/content/intro_image.php to templates/*your_template*/html/layouts/joomla/content/intro_image.php and it should use the version in your template instead of the default layout.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.