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> </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; ?>
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: 8 years 8 months ago by
andweb.
Please Log in or Create an account to join the conversation.