iekadou/twig_pjaxr 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iekadou/twig_pjaxr

最新稳定版本:v0.2.0

Composer 安装命令:

composer require iekadou/twig_pjaxr

包简介

PJAXR backend for Twig

关键字:

README 文档

README

How to install twig-pjaxr?

There are just two steps needed to install twig-pjaxr:

  1. Add twig-pjaxr to your composer.json:

    {
        "require": {
            "iekadou/twig_pjaxr": ">=0.2.0",
        }
    }
  2. 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?

  1. PHP >= 5.3.3
  2. twig
  3. php-pjaxr
  4. jquery-pjaxr

Projects using twig-pjaxr

  1. pjaxr.io

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

统计信息

  • 总下载量: 43
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-27