Hello all.
The folowing SVG Helper works fine when used within a template:
<?= svg("assets/images/arrow-right.svg") ?>
I would also like to use this same helper within a panel field.
However no matter how I configure field methods the helper is basically being replicated within the code like this:
I would obviously like the SVG to render and display inline.
My page blueprint setup is:
servicesoptions:
label: Services Modules
type: structure
columns:
title:
width: 1/4
text:
width: 3/4
fields:
title:
label: Title
type: text
icon:
label: Icon
type: files
text:
label: Text
type: textarea
url:
label: Url
type: text
required: false
linktext:
label: Link Text
type: text
required: false
My template code is as follows:
<?php if ($item->url()->isNotEmpty()): ?>
<a href="<?= $item->url()->html() ?>" class="btn"><?= $item->linktext()->kirbytextinline() ?></a>
<?php endif; ?>
I would be grateful if someone could point me in the right direction.
Thank you.