Keyword

Image Caption

  • Eyal Kattan
  • Eyal Kattan's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 9 months ago #61088 by Eyal Kattan
Image Caption was created by Eyal Kattan
Hi All,

Antbody knows how can I add the caption of an Item's image to the Item Listing View In Category?

It looks like the caption can be set for Item View but not for Item View In Category Listing

Any help would be greatly appreciated

Thanks

Eyal Kattan
Owner
MEDIA NEXUS INC

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

  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
  • Offline
  • Senior Member
More
12 years 9 months ago #61089 by Andrey Miasoedov
Replied by Andrey Miasoedov on topic Re: Image Caption
Hello, Eyal.

I just checked it and all work fine, alt attribute is setted in category listing and item page as well.

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

  • Eyal Kattan
  • Eyal Kattan's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 9 months ago - 12 years 9 months ago #61090 by Eyal Kattan
Replied by Eyal Kattan on topic Re: Image Caption

Andrey Miasoedov wrote: Hello, Eyal.

I just checked it and all work fine, alt attribute is setted in category listing and item page as well.


Hi Andrey,

My apologies but I must be still wasted from new year's eve :)

I attached 2 images: one of the "Item View Options In Category Listing" that shows no image caption settings and the second screenshot of the "Image View Options" that does include caption settings.

My version is:
(Last update: December 9th, 2011 - Version 2.5.4)

Am I missing anything?

Thanks,

Eyal

Eyal Kattan
Owner
MEDIA NEXUS INC
Attachments:

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

More
12 years 9 months ago #61091 by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Image Caption
I not sure it will work, but:

1. in templates change code for image display in 'category_item.php' - just copy 'captions/credits' part from 'item.php'
2. make sure you have in category options 'display captions/credits' set to yes (or it won't work)

Hope it helps :-)

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

  • Eyal Kattan
  • Eyal Kattan's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 9 months ago #61092 by Eyal Kattan
Replied by Eyal Kattan on topic Re: Image Caption

Jakub Jedynak wrote: I not sure it will work, but:

1. in templates change code for image display in 'category_item.php' - just copy 'captions/credits' part from 'item.php'
2. make sure you have in category options 'display captions/credits' set to yes (or it won't work)

Hope it helps :-)


Just to make sure.. this is under Administrator templates right?

Eyal Kattan
Owner
MEDIA NEXUS INC

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

More
12 years 8 months ago #61093 by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Image Caption
No. In k2 templates for the site part.

The best way is to COPY default k2 templates (default folder and it's content) from:

components > com_k2 > templates > default

to:

templates > NAME OF FRONTEND USED TEMPLATE > html > com_k2 > templates > default

and then in this folder open and edit mentioned in previous post 'php' files.

You can make in this way different layouts and use it in different parts of the site (choosing it lalter in category options) - just clone 'default' folder under new name and change in the files what you want (knowing of basic 'php/html' required).

Files in template (edit if you want change layout of the article):

item.php - view and content of the full article
category_item.php - view and content of the article on the category list

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

  • Eyal Kattan
  • Eyal Kattan's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 8 months ago - 12 years 8 months ago #61094 by Eyal Kattan
Replied by Eyal Kattan on topic Re: Image Caption
AWESOME! Now I'm starting to understand how powerful Joomla+K2 are. Thanks so much for your reply.. it worked like a charm.

I assume, alignment of the caption etc... is set in my site template? I used this line of code for the caption:


<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
<!-- Image caption -->
<div class="catItemImageCaption"><?php echo $this->item->image_caption; ?>
</div>
<?php endif; ?>


so I guess I need to create a CSS class named catItemImageCaption and tweak it as I need?

Thanks

Eyal

Eyal Kattan
Owner
MEDIA NEXUS INC

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

More
12 years 8 months ago #61095 by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Image Caption

Eyal wrote: AWESOME! Now I'm starting to understand how powerful Joomla+K2 are. Thanks so much for your reply.. it worked like a charm.


Yes it is very powerful after some tweaks ;-)

Eyal wrote: so I guess I need to create a CSS class named catItemImageCaption and tweak it as I need?


Yes.

Eyal wrote: Thanks


You welcome ;-)

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


Powered by Kunena Forum