We’re with you. JoomShaper is offering a 20% Discount on all plans due to the impact of COVID-19

Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

how to Show k2 item image on News Highlighter

Featured Lock Resolved Issue

Please let me know how can I show k2 item image on News Highlighter?

I added below code to default.php on tmpl folder:
$image='<img class="sp-nh-image" src="'. modNewsHighlighterHelper::getText($item->image) .'" alt="" />' ;
But it doesn't works

Which file(s) should I edit? how?

2 Answers

Ehsan Riyadh

More than a month ago #Permalink
Sorry, it is not possible.


More than a month ago #Permalink
But Ehsan, I done it.
I just added below code at line 49 on default.php in tmlp folder:

$image='<img class="sp-nh-image" src="/media/k2/items/cache/'.md5("Image".modNewsHighlighterHelper::getText($item->id)).'_xs.jpg" alt="" />' ;

Also added $image variable to line 54:

$text = $image.$title.$textintro.$date;

check the attached file.


There are no replies made for this post yet.
Be one of the first to reply to this post!




Community Users


Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us