Closed renestalder closed 3 years ago
A short check whether this has something to do with the plugin or not reveals, that when I move the blocks/heading.twig
from the plugin to the kirby instance directly, it renders the Twig content to HTML.
So, it looks like it has something to do with assigning snippets in plugins.
Hi @renestalder, thank you for pointing this out. I fixed this in the newest release 4.1.4. Does it work now?
@seehat Wow, that was fast. Are you a magician or something? It works like a charm.
Thank you a million times.
Thank you! I'm happy that it works like a charm now. I appreciate you for writing your last message, especially the magician part. :)
I have everything specific to a website in a plugin, including templates, blueprints, controllers. This also works fine with the Twig plugin. I can reference "templates" in my plugin to Twig files instead of PHP.
I noticed, this doesn't seem to work for snippets.
When I try to overwrite the
heading
block (because my plugin extends the fields via a blueprint), the template content will render as raw output, not rendered by the Twig engine.The heading overwrite might look something like this:
For all other parts so far, the Twig engine seems to rendered everything properly, just not for those snippets defined in the plugin.
As an example, this works fine:
It most likely doesn't necessarily have something to do with the fact that this is all defined in a plugin. Entirely possible, this also happens when overwriting default blocks outside a plugin.