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