I’m trying to insert a snippet in my article text.
Available docs show two ways to do this:
- Custom tags https://getkirby.com/docs/developer-guide/kirbytext/tags
- Though
kirbytext.extended.php
, as shown in Embed snippets right into your Kirbytext flavored content. Handy for including dynamic content. For example, just call (snippet: articles limit: 5) to include the articles.php snippet and limit those articles by 5. · GitHub
For 1., I’ve written a custom tag that parses into a snippet, but it seems to insert before my article text under the header. I suspect that it has something to do with how Kirby processes Kirbytext.
Which brought me to 2. I took the kirbytext.extended.php
and put it in the /site/plugins
directory. However, Kirby seems to ignore this file and the final page shows (snippet: snippetname)
. I checked the Kirby docs and tried adding different tags, but nothing seems to change. However, Kirby does seem to react to syntax errors in the kirbytext.extended.php
if there are any.
Is there anything else I could do to insert a snippet into the article text?
I’m running:
Kirby 2.4.0 Ubuntu 16.04 PHP 5.6 (but also tried 7.0) Nginx 1.10.0