TOPIC: how to change alt tag from k2 image?

  • Page:
  • 1
  • 2
  • luis
  • luis's Avatar
  • OFFLINE
  • New Member
  • Posts: 18

how to change alt tag from k2 image? 3 years 4 days ago #132133

hi i wanted to know how to change the alt tag of an image from k2, i uploaded different articles and the images take the alt tag from the title of the article

im talking about the main image taken from the media folder (itemimage), not the other ones you can put inside the article
thx
  • Krikor
  • Krikor's Avatar
  • OFFLINE
  • Moderator
  • Posts: 14346

Re: how to change alt tag from k2 image? 3 years 4 days ago #132134

You need to override the item.php file.
In the alt tag you need to use $this->item->title;

This post will help you with overrides:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/
  • luis
  • luis's Avatar
  • OFFLINE
  • New Member
  • Posts: 18

Re: how to change alt tag from k2 image? 3 years 3 days ago #132135

i am new to this, but i want to customize the alt tag from the main k2 image of an article...


isnt that code $this->item->title; going to put the title (of the article) like alt tag??


ty

Re: how to change alt tag from k2 image? 3 years 3 days ago #132136

Thats right. It places the article title as the image alt for that k2 item image.
  • luis
  • luis's Avatar
  • OFFLINE
  • New Member
  • Posts: 18

Re: how to change alt tag from k2 image? 3 years 3 days ago #132137

do you know how can i customize the alt? , in other words how can i make it different from gettin the title name

ty

Re: how to change alt tag from k2 image? 3 years 2 days ago #132138

You can edit it by creating template overrides like Krikore suggested. This will work if you have a pattern to use for all img alt. But if you want to change image Alt for each image individually, then it's not possible. What kind of alt info are you planning to add? Any particular reason you want to have a specific alt for images? Can you give examples?
  • Krikor
  • Krikor's Avatar
  • OFFLINE
  • Moderator
  • Posts: 14346

Re: how to change alt tag from k2 image? 3 years 2 days ago #132139

You can also use K2's photo caption or credits.
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/
  • luis
  • luis's Avatar
  • OFFLINE
  • New Member
  • Posts: 18

Re: how to change alt tag from k2 image? 2 years 11 months ago #132140

where is this k2 credits/photo caption?

i want to customize alt because of seo of images
  • luis
  • luis's Avatar
  • OFFLINE
  • New Member
  • Posts: 18

Re: how to change alt tag from k2 image? 2 years 11 months ago #132141

i found them! but are they going to change the alt? or is not possible to customize it then? ty
  • Krikor
  • Krikor's Avatar
  • OFFLINE
  • Moderator
  • Posts: 14346

Re: how to change alt tag from k2 image? 2 years 11 months ago #132142

You can use that fields as your image's alt tag.
This has to be done in your item.php file of course.
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/
  • Page:
  • 1
  • 2
Moderators: william white

Who Is Online

Total users online: 22 Members and 4253 Guests Online
Beppe De Lorenzis Christophe BERTRAND CloudByte Davy Donnell Holness Fairtech Francesco Gary Hansen Goble002 Inter-Ibex Jos Larry Mitchell Mohammed Refat Reymond Startprogram Tomáš Václ Uzi YODAstudio michael razen site william white
Legend ::   Site Administrator Global Moderator Moderator Banned User Guest
  • Total Messages: 137434 | Total Subjects: 36267
  • Total Sections: 6 | Total Categories: 32
  • Today Open: 6 | Yesterday Open: 3
  • Today Total Answer: 8 | Yesterday Total Answer: 22
Powered by Kunena Forum