End of Support for Joomla 3 - Forum closed

[SOLVED] Link images in Mosaic Sprocket Module to articles

  • giorgio
  • giorgio's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1

Link images in Mosaic Sprocket Module to articles was created by giorgio

Posted 8 years 2 months ago #15129
Hi JoomlaPlates,
compliments for your Black&White Template, I like it very much for my small wedding website elemattesposi.it .
I'm writing to ask you how can I link the images in the Mosaic Sprocket Module directly to articles and not to the image pop-up, as it is the case already for the "read more" button and the title. How do I have to customize my css?
Thank you very much for your assistance,
best regards,
Giorgio
Last Edit:8 years 2 months ago by giorgio
Last edit: 8 years 2 months ago by giorgio. Reason: typing error

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

  • giorgio
  • giorgio's Avatar Offline Topic Author
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1

Replied by giorgio on topic Link images in Mosaic Sprocket Module to articles

Posted 8 years 2 months ago #15146
Hi,
after backing-up the template, I tried a "brute force" solution (as I do not know neither css nor php codes).
I've modified JOOMLAROOT/templates/jp-bw/roksprocket/layouts/mosaic/themes/default/item.php

Instead of text in bold:

<div class="sprocket-mosaic-image-container">
<a href="<?php echo $item->getPrimaryImage()->getSource(); ?>" data-uk-lightbox title="<?php echo $item->getPrimaryImage()->getAlttext(); ?>"><img src="<?php echo $item->getPrimaryImage()->getSource(); ?>" alt="<?php echo $item->getPrimaryImage()->getAlttext(); ?>" class="hover-effect" />
<p class="view">+</p></a>

I wrote:

<div class="sprocket-mosaic-image-container">
<a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>" ><img src="<?php echo $item->getPrimaryImage()->getSource(); ?>" alt="<?php echo $item->getPrimaryImage()->getAlttext(); ?>" class="hover-effect" />
<p class="view">+</p></a>

Then, as my "read more" link was no longer useful, I removed it simply by deleting the following line in bold:
<?php if ($item->getPrimaryLink()) : ?>
<a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>" class="uk-button uk-button-primary"><span><?php rc_e('READ_MORE'); ?></span></a>
<?php endif; ?>

Now it appears to work just as I wanted to.
If a more elegant solution can better fulfill this task, I'll be glad to adopt it.
Thanks for your attention,
Giorgio
by giorgio
The following user(s) said Thank You: joomlaplates

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

Replied by joomlaplates on topic Link images in Mosaic Sprocket Module to articles

Posted 8 years 2 months ago #15150
Yes youre right.
It was the right way to do it.
Customizing the override files are based on this folder:
JOOMLAROOT/templates/jp-bw/roksprocket/layouts

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

Replied by joomlaplates on topic [SOLVED] Link images in Mosaic Sprocket Module to articles

Posted 8 years 2 months ago #15151
Problem solved.

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 © 2024 JoomlaPlates | Professional Joomla Templates with Uikit 3

Disclaimer & Privacy | License