You must be logged in to view the page.×

Possibility to change link main image to file?

LiteCart Fan
Fra Netherlands
Medlem siden

Is it possible to put a link behind the main image so that you go directly to the added file? I think the image is large enough and does not need to be enlarged when I click on it, I would like to change this so that you go directly to the attached file.

I have tried several things in Vmod but I keep getting error message after error message. I am looking at the code below from views/box_product


              <a class="main-image thumbnail" href="<?php echo document::href_rlink(FS_DIR_STORAGE . $image['original']); ?>" data-toggle="lightbox" data-gallery="product">
                <img class="img-responsive" src="<?php echo document::href_rlink(FS_DIR_STORAGE . $image['thumbnail']); ?>" srcset="<?php echo document::href_rlink(FS_DIR_STORAGE . $image['thumbnail']); ?> 1x, <?php echo document::href_rlink(FS_DIR_STORAGE . $image['thumbnail_2x']); ?> 2x" style="aspect-ratio: <?php echo $image['ratio']; ?>;" alt="" title="<?php echo functions::escape_html($name); ?>" />
                <?php echo $sticker; ?>
              </a>
            </div>```
tim
Founder
Fra Sweden
Medlem siden
tim

To navigate directly to an image just remove the attributes data-toggle="lightbox" and data-gallery="product" from the anchor tag.

Du
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.