Add item image in Users (User list)

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
2 weeks 2 days ago #178521 by Fotis
Replied by Fotis on topic Add item image in Users (User list)
In that case, the image is not prepared.

You can build it though.

Within the foreach loop add this code for your image:
<?php if (JFile::exists(JPATH_SITE.'/media/k2/items/cache/'.md5("Image".$item->id).'_M.jpg')): ?>
<img src="<?php echo JUri::base(true).'/media/k2/items/cache/'.md5('Image'.$item->id).'_M.jpg'; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" />
<?php endif; ?>

Replace _M in _M.jpg with the size you want (pick from XS, S, M, L, XL, Generic).

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory:

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum