kirbytext()
Parses KirbyTags and Markdown in the given string. Shortcut for $kirby->kirbytext()
kirbytext(string|null $text = null, array $data = [ ]): string
Parameters
Name | Type | Default |
---|---|---|
$text | string ornull |
null
|
$data | array |
[ ]
|
Return type
string
Alias
kt()
Examples
<?= kirbytext($page->text()) ?>
<?= kt($page->text()) ?>
Parse KirbyText for another page
<?= kirbytext('(image: road.jpg)', ['parent' => $page->children()->first()]) ?>