Comments (1)
Okay, I think the issue is that since 3.0.0, when installed with the zip download or Kirby’s CLI, the plugin is automatically registered. That’s the way most Kirby plugins work, including the Blade plugin.
See the install section:
https://github.com/fvsch/kirby-twig#installation
And the plugin’s main script:
https://github.com/fvsch/kirby-twig/blob/master/twig.php
You only have to use the Kirby\Twig\Plugin::register
method when installing the plugin with Composer.
The Blade plugin is doing roughly the same thing:
https://github.com/pedroborges/kirby-blade-template/blob/master/blade.php
The reason that the Blade plugin doesn’t work with the Twig plugin also enabled is that you can only register one template component, and since plugins are loaded in alphabetical order, so this is what happens:
$kirby->set('component', 'template', PedroBorges\Blade\Template::class);
$kirby->set('component', 'template', 'Kirby\Twig\TwigComponent');
The second call overwrites the first one, so Blade is not used.
If you want to keep the Twig plugin around (in your site/plugins
folder) but disable it, you can edit site/plugins/twig/twig.php
to comment out the call to Kirby\Twig\Plugin::register
.
Alternatively, just rename that file to twig.php.disabled
and Kirby won’t load it.
from kirby-twig.
Related Issues (20)
- Documentation: Twig filters HOT 1
- Documentation: twig.function.* option
- How to output config values, getting an error? HOT 2
- Possible to access others Kirby variables? HOT 2
- Kirby Uniform how to get it to work with twig HOT 3
- How to load twig templates with Kirby function tpl::load HOT 3
- Can't register namespaces, functions & filters in plugins HOT 2
- Somehow allow adding safe functions HOT 2
- how to use twig 2.x HOT 2
- How to get file URL HOT 3
- Unable to find templates with WAMP or XAMPP on windows HOT 6
- Twig 2 support coming soon? HOT 2
- Kirby 3 Version HOT 4
- Improve installation guide using composer
- cookie::get() won't work HOT 2
- Support for resize or thumb HOT 4
- Rename "main" branch to "master" HOT 3
- Does this even work on Kirby 3? HOT 2
- Example of how to use the new layout field using kirby-twig HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby-twig.