Kirbytags in PHP

Hi there,

is there any way to add a Kirbytag in a Template? For example (only a example, this is not what I want to achive) if I add this to my snippet “header.php”:

(date: year)

It will also echo exact this … is there any way to “parse” them directly in a snippet? A function like:

<?= kirbytag(date: year) ?>

Or something similar? Thanks in advance.

Cheers, Oli

If I’m not mistaken you can use the kirbytag function like so:

<?= kirbytag(['date' => 'year']) ?>

1 Like

Link to the docs:

1 Like

Exact was I was searching. Thanks a lot! I have searched a while in documentation but only searched after “tag” and that wasn’t successful :slight_smile: