Skip to content

Kirby 3.8.4

kirbytag()

Makes it possible to use any defined Kirbytag as standalone function

kirbytag(string|array $type, string $value = null, array $attr = [ ], array $data = [ ]): string

Parameters

Name Type Default
$type * string|array
$value string null
$attr array [ ]
$data array [ ]

Return type

string

Example

echo kirbytag([
  'link'  => 'blog/my-article',
  'text'  => 'Go to my blog article'
]);

// will manually do the same as
// (link: blog/my-article text: Go to my blog article)
// in KirbyText