Can Craft theme Multirow photos be made clickable with a button link?

Can Craft theme Multirow photos be made clickable with a button link?

AJWUK
Tourist
8 0 1

Is it possible to make Multirow photos clickable with the same link as the button (Craft theme)?

Replies 5 (5)

AJWUK
Tourist
8 0 1

I figured out the code and solved the issue.

AryavK
Trailblazer
224 9 32

PLEASE TELL HOW @AJWUK 

faith&you
AJWUK
Tourist
8 0 1

Hi,

 

To make my Multirow photos clickable I opened the 'Edit Code' for my Craft theme.  In Sections > multirow.liquid , I added the following lines of code:

 

Around Line 60

{%- if block.settings.image != blank -%}
<a class="fulllink" {% if block.settings.imglink == blank %}role="link" aria-disabled="true"{% else %}href="{{ block.settings.imglink }}"{% endif %}></a>
{%- capture sizes -%}

 

Around Line 110

<style>
.fulllink{z-index: 1;}
</style>

{% schema %}
{
"name": "t:sections.multirow.name",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},

 

Around Line 355

"label": "t:sections.multirow.blocks.row.settings.image.label"
},
{
"type": "url",
"id": "imglink",
"label": "Image Link"
},

 

After adding this code and saving the multirow.liquid Section, I exited the Edit Code mode and opened the Customize mode for my theme.  When I clicked on my Multirow photo I had a new option box to add a link for my photo:

 

Image link.JPG

 

I hope this helps you.

AryavK
Trailblazer
224 9 32

OF COURSE THIS DOES! YOU ARE THE MOST GOATED GOAT OF ALL TIMES!

faith&you
Bookarazzi_Man
Tourist
4 0 2

Hello, Thank you very much it worked and I can see the image link which i related it to the same link as the button , still the image isnt clickable , any tip ?