dev-master
9999999-dev http://philecms.comUse the Lex parser in your templates for PhileCMS
MIT
The Requires
by James Doyle
cms content phile
Use the Lex parser in your templates for PhileCMS
NOTE: This repository is not maintained anymore and archived., (*1)
Use the Lex parser in your templates for PhileCMS, (*2)
php composer.phar require phile/template-lex:*
plugins/phile/templateLex
After you have installed the plugin. You need to add the following line to your config.php
file:, (*3)
$config['plugins']['phile\\templateLex'] = array('active' => true);
Just add the Lex dependency to your composer.json file:, (*4)
{ "require": { "twig/twig": "1.14.*", "michelf/php-markdown": "1.3", "pyrocms/lex": "2.2.*" // this is the new line you will need } }
Now run your composer install
command as normal., (*5)
Modify your config.php
file:, (*6)
$config['plugins'] = array( // disable the Twig template engine 'phile\\templateTwig' => array('active' => false), // enable the Lex template engine 'phile\\templateLex' => array('active' => true) );
Due to the nature of the Page model in Phile, and the fact that Lex doesn't like some objects, there are some slightly different properties available to the pages
array., (*7)
This covers most of the things that the pages
array covers in Twig., (*8)
If you have not used Lex before, please read the docs because there are a few differences in syntax, and philosophy, over Twig., (*9)
I have included an index.lex
file to show how to recreate the index page from the default theme., (*10)
Use the Lex parser in your templates for PhileCMS
MIT
cms content phile