Keyword

item->image is empty in category view

  • juro
  • juro's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #75729 by juro
Hi,
when showing a category (menu item type: K2 » Itemlist / Category), I cannot get K2 to display the item's images.
Is this possible and if so, how?

- every item has an image (it is displayed in the item view)
- view image is set to Show in the Item view options in category listings

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

More
14 years 3 months ago #75730 by Todd Allen
Replied by Todd Allen on topic item->image is empty in category view
I am having the same problem. This works in most of my templates, but one in particular is not working. The item->image variable is not even empty. If I try to echo it or perform a strlen on it php errors out.

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

More
14 years 3 months ago #75731 by Todd Allen
Replied by Todd Allen on topic item->image is empty in category view
Just found the problem Roland after switching the page to another template that was working. You MUST have these lines at the top of the template under the JEXEC:

// Define default image size (do not change)
$image = 'image'.$this->params->get($this->item->itemGroup.'ImgSize');

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


Powered by Kunena Forum