iekadou / twig_pjaxr
PJAXR backend for Twig
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/iekadou/twig_pjaxr
Requires
- php: >=5.3.3
- iekadou/php_pjaxr: >=0.1.2
- twig/twig: ~1.0
This package is not auto-updated.
Last update: 2025-10-11 23:22:09 UTC
README
How to install twig-pjaxr?
There are just two steps needed to install twig-pjaxr:
-
Add twig-pjaxr to your composer.json:
{ "require": { "iekadou/twig_pjaxr": ">=0.2.0", } }
-
Add Twig_Pjaxr_Extension to the Twig-Engine:
$twig->addExtension(new Twig_Pjaxr_Extension());
How do i use twig-pjaxr?
Instead of using the {% extends %}
tag use {% pjaxr_extends %}
.
{% pjaxr_extends "__base.html" "__pjaxr.html" 'Pjaxr' %} {% block page %} ... {% endblock page %} or {% pjaxr_extends "__base.html" 'Pjaxr' %} {% block page %} ... {% endblock page %}
- The first argument is the template, which is extended if the request is not a PJAXR request, or the namespace does not match.
- The second argument is the template, which is extended if the namespace matches. (optional, default is "__pjaxr.html")
- The thrid argument is the namespace which should be tested against, to decide which template should be extended.
What do you need for twig-pjaxr?
- PHP >= 5.3.3
- twig
- php-pjaxr
- jquery-pjaxr
Projects using twig-pjaxr
If you are using twig-pjaxr, please contact me, and tell me in which projects you are using it. Thank you!
Happy speeding up your twig project!
For further information read twig-pjaxr on iekadou.com