End of Support for Joomla 3 - Forum closed
RokSprocket v2.1.21 - Mosaic - alt-tags
Hi,
I use the template snowflake and the extension RokSprocket, Mosaic. I have unfortunately a problem with the alt-tags.
The images are taken from the corresponding article (introduction picture), where the alternative text was specified.
The override (<?php echo $item->getPrimaryImage()->getAlttext(); ?>) I have adapted:
/templates/corporategames/roksprocket/layouts/mosaic/default/item.php
However, the alternative text of the article image is not displayed in the source code:
www.corporate-games.de
What am I doing wrong?
Thx in advance
Uli
I use the template snowflake and the extension RokSprocket, Mosaic. I have unfortunately a problem with the alt-tags.
The images are taken from the corresponding article (introduction picture), where the alternative text was specified.
The override (<?php echo $item->getPrimaryImage()->getAlttext(); ?>) I have adapted:
/templates/corporategames/roksprocket/layouts/mosaic/default/item.php
Code:
<?php if ($item->getPrimaryLink()) : ?><a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>"><?php endif; ?>
<img src="<?php echo $item->getPrimaryImage()->getSource(); ?>" alt="<?php echo $item->getPrimaryImage()->getAlttext(); ?>" class="sprocket-mosaic-image" />
<span class="sprocket-mosaic-hover"></span>
<span class="sprocket-mosaic-shadow"></span>
<?php if ($item->getPrimaryLink()) : ?> <span class="sprocket-mosaic-hovercontent"><span> </span></span> <?php endif; ?>
<?php if ($item->getPrimaryLink()) : ?>
</a>
<?php endif; ?>
</div>
<?php else : ?>
<?php if ($item->getPrimaryImage()) :?>
<div class="sprocket-mosaic-image-container">
<?php if ($item->getPrimaryLink()) : ?><a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>"><?php endif; ?>
<img src="<?php echo $item->getPrimaryImage()->getSource(); ?>" alt="<?php echo $item->getPrimaryImage()->getAlttext(); ?>" class="sprocket-mosaic-image" />
<?php if ($item->getPrimaryLink()) : ?>
<span class="sprocket-mosaic-hover"></span>
<span class="sprocket-mosaic-shadow"></span>
<span class="sprocket-mosaic-hovercontent"><span> </span></span>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
What am I doing wrong?
Thx in advance
Uli
Last Edit:6 years 9 months ago
by andweb
Last edit: 6 years 9 months ago by andweb.
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8738
- Thank you received: 1713
Replied by joomlaplates on topic RokSprocket v2.1.21 - Mosaic - alt-tags
Posted 6 years 9 months ago #17855
Hi Uli,
please update the roksprocket and then use the following code for the "alt" parameter:
please update the roksprocket and then use the following code for the "alt" parameter:
alt="<?php echo $item->getPrimaryImage ()->getAlttext(); ?>"
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
Last Edit:6 years 9 months ago
by joomlaplates
Last edit: 6 years 9 months ago by joomlaplates.
Please Log in or Create an account to join the conversation.
Replied by andweb on topic RokSprocket v2.1.21 - Mosaic - alt-tags
Posted 6 years 9 months ago #17857
Hi,
I am a bit confused
I already use the current version (RokSprocket v2.1.21) and the code is already included.
I am a bit confused
I already use the current version (RokSprocket v2.1.21) and the code is already included.
by andweb
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8738
- Thank you received: 1713
Replied by joomlaplates on topic RokSprocket v2.1.21 - Mosaic - alt-tags
Posted 6 years 9 months ago #17858
Hi there,
1.) Clean your Joomla and Browser cache
2.) Insert an alt tag for the Content image > image 1
3.) Check the source code > image 2
1.) Clean your Joomla and Browser cache
2.) Insert an alt tag for the Content image > image 1
3.) Check the source code > image 2
Attachment alt2.jpg not found
Attachment alt1.jpg not found
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
Last Edit:6 years 9 months ago
by joomlaplates
Attachments:
Last edit: 6 years 9 months ago by joomlaplates.
Please Log in or Create an account to join the conversation.
Replied by andweb on topic RokSprocket v2.1.21 - Mosaic - alt-tags
Posted 6 years 9 months ago #17861
Hi again,
Unfortunately, all this has brought no success.
Uli
Unfortunately, all this has brought no success.
Attachment image-alt-tag.JPG not found
Attachment graffiti-code.JPG not found
Uli
by andweb
Attachments:
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8738
- Thank you received: 1713
Replied by joomlaplates on topic RokSprocket v2.1.21 - Mosaic - alt-tags
Posted 6 years 9 months ago #17863
Maybe you are in the wrong file.
Please check it, because there are 2 different styles > gallery and default.
Please check it, because there are 2 different styles > gallery and default.
and/templates/corporategames/roksprocket/layouts/mosaic/default/item.php
/templates/corporategames/roksprocket/layouts/mosaic/gallery/item.php
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
Last Edit:6 years 9 months ago
by joomlaplates
Last edit: 6 years 9 months ago by joomlaplates.
The following user(s) said Thank You: andweb
Please Log in or Create an account to join the conversation.
Moderators: joomlaplates