- Posts: 19
COMMUNITY FORUM
alt attribute
- Nickos Dandoulakis
-
Topic Author
- Offline
- New Member
Less
More
9 years 10 months ago #145053
by Nickos Dandoulakis
alt attribute was created by Nickos Dandoulakis
i have problem with alt attribute in images of k2 item... how can i fix the alt to take the name of image name..... look the problem in the following link...
s12.postimg.org/ltuyj31kd/alt.png
s12.postimg.org/ltuyj31kd/alt.png
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 10 months ago #145065
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic alt attribute
Hello,
This is a template issue.
By default in K2 the alt attribute is the image's caption or the item's title.
You need to address this issue to the template's developer.
This is a template issue.
By default in K2 the alt attribute is the image's caption or the item's title.
alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>"
You need to address this issue to the template's developer.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Nickos Dandoulakis
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 19
9 years 10 months ago #145068
by Nickos Dandoulakis
Replied by Nickos Dandoulakis on topic alt attribute
Thanks a lot! Please tell me in which file can i find this code????
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 10 months ago #145073
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic alt attribute
You will have to ask the template's developer about that, since I do not know how that template was built.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Nickos Dandoulakis
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 19
9 years 10 months ago #145090
by Nickos Dandoulakis
Replied by Nickos Dandoulakis on topic alt attribute
I FOUND THIS COMMON CODE IN TEMPLATE 'S FILES ... CAN YOU HELP ME????
<!-- Item Image -->
<div class="itemImageBlock">
<span class="itemImage">
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>
<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
<!-- Image caption -->
<span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
<?php endif; ?>
<?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
<!-- Image credits -->
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>
<div class="clearfix"></div>
</div>
<!-- Item Image -->
<div class="itemImageBlock">
<span class="itemImage">
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>
<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
<!-- Image caption -->
<span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
<?php endif; ?>
<?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
<!-- Image credits -->
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>
<div class="clearfix"></div>
</div>
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 10 months ago #145102
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic alt attribute
This code snippet appears correct. I think you need to address this issue to the template's developer.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.