How to add captions to images on K2 category item list page

October 08 Joomla Templates
GK User
Wed Dec 14, 2011 5:14 am
I am using NewsII. I can see image captions just fine in the single item page. But I also need to have captions under all images on the category item list page and the category/subcategory page with thumbnails.

I have spent about two hours looking over the com K2 template files and have tried several things, but I just cannot seem to get the captions to show wherever the image displays and not just on the individual item page. Most of the sources for the images that I will be using require that I use captions and attribution directly with the images. Therefore it is a requirement for me that I get these captions to display.

The site has not been launched yet, so there I cannot post a URL.

Thanks.

Bookman1
User avatar
Fresh Boarder

GK User
Thu Dec 15, 2011 4:22 am
Anyone? Surely there is a way to display captions on K2 category lists. I have worn out my eyes trying to find a place in the template code to set it. It appears that the template is already set up for it, but it will not display in K2 category lists.

Bookman1
User avatar
Fresh Boarder

GK User
Wed Jan 11, 2012 5:19 am
K2 itsels inserts only one image on top of the text. it may have caption, too. if you insert more pictures with joomla feature, captions do not show up.
this is what I learnt from documents. and, K2 is not very supportive to our questions and that's why I uninstalled all K2 components.
levent
User avatar
Senior Boarder

GK User
Wed Jan 11, 2012 10:53 am
It would help us if you can post a link to pages you are talking about so we can check. If website is in a localhost you can use demo website for examples. Thank you.

See you around...
User avatar
Platinum Boarder

GK User
Wed May 30, 2012 5:05 am
I added this line

Code: Select all
JHTML::_('behavior.caption');


to the k2 system plugin code (./plugins/system/k2/k2.php) after line 43
like this:
Code: Select all
.
.
JHTML::_('behavior.mootools');
JHTML::_('behavior.modal');
JHTML::_('behavior.caption'); // added for caption support
.
.


and it worked.

(of course you have to set the captions to the images properly for this to work)
User avatar
Fresh Boarder

GK User
Thu Jun 21, 2012 6:43 am
Glad to hear you have fixed it. See you around...
User avatar
Platinum Boarder


cron