All PHP methods and helpers of Kirby support the query for UUIDs. This includes: Helper functions like page() […] Kirby will do the search for you. It will also automatically recognize whether you pass a file path or a UUID (each UUID starts with a URI protocol like page://).
(Source: Unique IDs & Permalinks | Kirby CMS)
Shouldn’t this also work with <?= $page->text() ?>
I already use UUIDs elsewhere (related links), but they are not integrated in a writer field.
The writer-field is rendered with <?= $page->text() ?>.
This also works well, as all textformatting is rendered.
But the link is only displayed as a UUID permalink:
However, “/datenschutz” should be displayed there.
$field->permalinksToUrls() only outputs the link, not the writer content.
In the instructions, I understand that the permalink is automatically converted into a “readable” link. Or does the output have to be extended with an if query?
I hope that my little question is now easier to understand.
Aenean eu leo quam. <a href="/@/page/ZWZVZSlNpA6VJzXZ">Pellentesque</a> ornare sem lacinia quam venenatis vestibulum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod.
$page->text()->permalinksToUrls() :
Aenean eu leo quam. <a href="http://k4rc.test/notes">Pellentesque</a> ornare sem lacinia quam venenatis vestibulum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod.
I’ve been working with Kirby for a few months now and have learned and achieved a lot thanks to your great help and the super support here in the forum
But now I’m stuck in the same place and can’t get any further. It’s probably just a small problem and my mental block is unnecessarily large.
How do I output a permalink that I have created in a layout or block?
That was too easy. I couldn’t see the wood for the trees. I already had a text.php snippet and only had to add ->permalinksToUrls() to make it work. Thanks for showing me the right way.