dev-master
9999999-devView engine plugin for Seotoaster 2.x, that brings Twig and Blade power to the system
MIT
The Requires
The Development Requires
by Eugene I. Nezhuta
twig blade seotoaster
View engine plugin for Seotoaster 2.x, that brings Twig and Blade power to the system
TwAde is the plugin for the SEO Toaster CMS, (*2)
With TwAde it is very easy to start using the power of the popular template engines, such as Twig, Blade or Mustache, within your plugins or, even, in the SEO Toaster's core!, (*3)
$ curl -s https://getcomposer.org/installer | php
{ "require": { "theneiam/twade": "dev-master" } }
$ composer install
Example of how to use power of the famous template engines with TwAde. you can find some demos in the Twade.php, (*4)
// Define config options. // Twig engine options. It supports Twig extensions now! $options = array( 'engine' => 'Twig', 'templatesPath' => __DIR__ . '/example/twig/', 'cache' => __DIR__ . '/../../cache/', 'extensions' => array( 'Twig_Extensions_Extension_I18n' // The i18n extension only works if the PHP gettext extension is enabled. ) ); // Blade engine options $options = array( 'engine' => 'Blade', 'templatesPath' => __DIR__ . '/example/blade/', 'cache' => __DIR__ . '/../../cache/' ); // Mustache engine options. Yeah! Twade supports mustache from now on! $options = array( 'engine' => 'Mustache', 'templatesPath' => __DIR__ . '/example/mustache', 'cache' => __DIR__ . '/../../cache/' ); // Now, let's create a view and enjoy // Create view $view = \Twade\Engine\Factory::create($options); // Assign some vars $view->welcome = 'Welcome to the TwAde plugin!'; // Disco! echo $this->_view->render('welcome');
View engine plugin for Seotoaster 2.x, that brings Twig and Blade power to the system
MIT
twig blade seotoaster