End of Support for Joomla 3 - Forum closed

RokSprocket v2.1.21 - Mosaic - alt-tags

  • andweb
  • andweb's Avatar Offline Topic Author
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 1

RokSprocket v2.1.21 - Mosaic - alt-tags was created by andweb

Posted 6 years 9 months ago #17853
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
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>&nbsp;</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>&nbsp;</span></span> </a> <?php endif; ?> </div> <?php endif; ?>
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
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.

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:

alt="<?php echo $item->getPrimaryImage ()->getAlttext(); ?>"

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.

  • andweb
  • andweb's Avatar Offline Topic Author
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 1

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.
by andweb

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

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

Attachment alt2.jpg not found


Attachment alt1.jpg not found

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.

  • andweb
  • andweb's Avatar Offline Topic Author
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 1

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.

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.

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.

/templates/corporategames/roksprocket/layouts/mosaic/default/item.php

and

/templates/corporategames/roksprocket/layouts/mosaic/gallery/item.php

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

Installations-Service

Don´t waste your time, we install your purchased Template
with the "Demo Content" within the next 24 hours.

Buy Now - 59€

Joomlaplates/Theme-Point is not affiliated with or endorsed by Open Source Matters or the Joomla! Project

Copyright © 2022 JoomlaPlates | Professional Joomla Templates with Uikit 3

Disclaimer & Privacy | License