Keyword

Image Credits = Autor name

More
9 years 3 months ago #145189 by tutek
Image Credits = Autor name was created by tutek
Hi

Is there a possibility to permanently set the Image Credits or Image Caption so that showed the name of the author?

Image Credits = Author Name
Always.

Please hint.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #145195 by Krikor Boghossian
Replied by Krikor Boghossian on topic Image Credits = Autor name
Yes you can do this on your template's overrides.

Locate this block of code in the item.php file:
<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
		<!-- Image caption -->
		<div class="itemImageCaption"><?php echo $this->item->image_caption; ?></div>
		<?php endif; ?>

And change it to this.
		<?php if($this->item->params->get('itemImageMainCaption')): ?>
		<!-- Image caption -->
		<div class="itemImageCaption"><?php echo $this->item->author->name; ?></div>
		<?php endif; ?>

This post will help you locate/ override the item.php file: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 2 months ago #145613 by tutek
Replied by tutek on topic Image Credits = Autor name
That's it - thank you

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #145631 by Krikor Boghossian
Replied by Krikor Boghossian on topic Image Credits = Autor name
You 're welcome Tutek :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum