Hello everyone,
I want to make an image-wrapper-div. I found a plugin that lets me do that via a snippet.
https://github.com/rasteiner/k3-image-tag
snippets/imagetag.php
< div class=“image-wrapper”>
< a href=“” data-fancybox=“page”>
< img src=“<?= $image->resize(150)->url() ?>” alt=“<?= html($alt) ?? $image->alt()->html() ?>” />
< /a>
< /div>
The custom tag is called div-image.
It works fine, but my question is:
How do I pass the link from the kirby panel to the < a >-tag in the snippet? Is there a $php-variable for this?
Note: The link will adress a subpage.
kirbypanel-text
Hello this is my image:
(div-image: face_02.jpg width: 25% link: /ensemble/gunnar)
Cheers
~Felix