2017 © Pedro Peláez
 

library twig_lare

Lare backend for Twig

image

lare_team/twig_lare

Lare backend for Twig

  • Friday, June 26, 2015
  • by iekadou
  • Repository
  • 2 Watchers
  • 0 Stars
  • 37 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

twig-lare

How to install twig-lare?

There are just two steps needed to install twig-lare:, (*1)

  1. Add twig-lare to your composer.json:, (*2)

    {
        "require": {
            "lare_team/twig_lare": ">=1.0.0",
        }
    }
    
  2. Add Twig_Lare_Extension to the Twig-Engine:, (*3)

    $twig->addExtension(new Twig_Lare_Extension());
    

How do i use twig-lare?

Instead of using the {% extends %} tag use {% lare_extends %}., (*4)

{% lare_extends "::__base.html" 'Previous.Namespace' "::__lare.html"  %}
{% block page %}
...
{% endblock page %}

or

{% lare_extends "::__base.html" 'Lare' %}
{% block page %}
...
{% endblock page %}
  • The first argument is the template, which is extended if the request is not a Lare request, or the namespace does not match.
  • The second argument is the namespace which should be tested against, to decide which template should be extended.
  • The third argument is the template, which is extended if the namespace matches. (optional, default is "::__lare.html")

What do you need for twig-lare?

  1. PHP >= 5.3.3
  2. twig
  3. lare.js

Projects using twig-lare

  1. lare.io

If you are using twig-lare, please contact me, and tell me in which projects you are using it. Thank you!, (*5)

Happy speeding up your twig project!, (*6)

For further information read twig-lare on iekadou.com, (*7)

The Versions

26/06 2015

dev-master

9999999-dev http://iekadou.com

Lare backend for Twig

  Sources   Download

MIT

The Requires

 

templating

26/06 2015

v1.0.0

1.0.0.0 http://iekadou.com

Lare backend for Twig

  Sources   Download

MIT

The Requires

 

templating