2017 © Pedro Peláez
 

library smarty-module

Smarty template engine module for Zend Framework 2

image

murganikolay/smarty-module

Smarty template engine module for Zend Framework 2

  • Friday, June 26, 2015
  • by MurgaNikolay
  • Repository
  • 8 Watchers
  • 29 Stars
  • 21,354 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 26 Forks
  • 8 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

Welcome to the SmartyModule for Zend Framework 2!

SmartyModule is a module that integrates the Smarty templating engine with Zend Framework 2., (*1)

Version: 1.2.0, (*2)

Istallation

Composer

  1. Add "murganikolay/smarty-module": "1.2.0" to your composer.json file and run php composer.phar update.
  2. Add SmartyModule to your config/application.config.php file under the modules key.

Manual

  1. git clone https://github.com/MurgaNikolay/SmartyModule.git in to vendor dir
  2. Put Smarty in to vendor dir
  3. Setup autoloader for load Smarty.
  4. Add SmartyModule to your config/application.config.php file under the modules key.

Configuration

Change you Application config like this:, (*3)

...
'view_manager' => array(
    'default_suffix' => 'tpl', // <-- new option for path stack resolver
    'display_not_found_reason' => true,
    'display_exceptions'       => true,
    'doctype'                  => 'HTML5',
    'not_found_template'       => 'error/404',
    'exception_template'       => 'error/index',
    'template_map' => array(
        'layout/layout'           => __DIR__ . '/../view/layout/layout.tpl',
        'application/index/index' => __DIR__ . '/../view/application/index/index.tpl',
        'error/404'               => __DIR__ . '/../view/error/404.tpl',
        'error/index'             => __DIR__ . '/../view/error/index.tpl',
    ),
    'smarty' => array(
        'error_reporting'=> E_PARSE,
        'compile_dir' => 'path/to/compile/dir',
        'cache_dir' => 'path/to/cache/dir',
        //Other Smarty options
    ),
    'template_path_stack' => array(
        __DIR__ . '/../view',
    ),
),
...

Aditional info about view manager: Zend\View., (*4)

The Versions

26/06 2015

dev-master

9999999-dev https://github.com/MurgaNikolay/SmartyModule

Smarty template engine module for Zend Framework 2

  Sources   Download

MIT

The Requires

 

by Murga Nikolay

zf2 zend module smarty view

12/06 2013

1.2.0

1.2.0.0 https://github.com/MurgaNikolay/SmartyModule

Smarty template engine module for Zend Framework 2

  Sources   Download

MIT

The Requires

 

by Murga Nikolay

zf2 zend module smarty view

12/06 2013

dev-dev

dev-dev https://github.com/MurgaNikolay/SmartyModule

Smarty template engine module for Zend Framework 2

  Sources   Download

MIT

The Requires

 

by Murga Nikolay

zf2 zend module smarty view

30/01 2013

1.1.0

1.1.0.0 https://github.com/MurgaNikolay/SmartyModule

Smarty template engine module for Zend Framework 2

  Sources   Download

MIT

The Requires

 

by Murga Nikolay

zf2 zend module smarty view

28/12 2012

1.0.0

1.0.0.0 https://github.com/MurgaNikolay/SmartyModule

Smarty template engine module for Zend Framework 2

  Sources   Download

The Requires

 

by Murga Nikolay

zf2 zend module smarty view