2017 © Pedro Peláez
 

library gk-smarty

Zend Framework 3 module that provides a Smarty rendering strategy

image

gkralik/gk-smarty

Zend Framework 3 module that provides a Smarty rendering strategy

  • Sunday, March 25, 2018
  • by gkralik
  • Repository
  • 2 Watchers
  • 2 Stars
  • 3,516 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

GkSmarty - Smarty Module for Zend Framework 2

GkSmarty is a module for integrating the Smarty template engine with Zend Framework 2., (*1)

Installation with Composer

Installing via Composer is the only supported method., (*2)

  1. Add "gkralik/gk-smarty": "~1.0" to your composer.json file and run php composer.phar update.
  2. Add GkSmarty to your application's config/application.config.php file under the modules key.

Configuration

For information on configuring GkSmarty, refer to the module config file., (*3)

There is also a sample configuration file with all available configuration options., (*4)

You can set options for the Smarty engine under the smarty_options configuration key (eg force_compile, etc)., (*5)

Pay attention to the compile_dir and cache_dir keys. Smarty needs write access to the directories specified there., (*6)

Documentation

Using ZF2 View Helpers

Using view helpers of ZF2 is supported. Just call the view helper as you would do in a PHTML template:, (*7)

{$this->docType()}

{$this->basePath('some/path')}

View helpers that need access to the renderer

ZF2 has some issues with supporting multiple renderers with view helpers. GkSmarty uses it's own HelperPluginManager to work around this issue. The default plugin manager from ZF2 is added as a peering manager to ease using view helpers that do not required access to the renderer. This means, (*8)

You must register view helpers that require a renderer with GkSmarty's helper manager. Refer to module.config.php for an example. Some defaults have been taken care of for you (see HelperPluginManager for details)., (*9)

Acknowledgements

Thanks to ZfcTwig for an excellent example on how to integrate templating engines with ZF2 and for finding a workaround for view helpers that need access to the renderer (see above)., (*10)

The Versions

25/03 2018

dev-zf3

dev-zf3 http://www.github.com/gkralik/GkSmarty

Zend Framework 3 module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

module smarty zf3

05/01 2018

dev-master

9999999-dev http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

15/04 2016

1.1.0

1.1.0.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

10/10 2015

1.0.0

1.0.0.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

01/04 2014

0.5.3

0.5.3.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

24/03 2014

0.5.2

0.5.2.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

07/03 2014

0.5.1

0.5.1.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 module smarty

07/03 2014

0.5.0

0.5.0.0 http://www.github.com/gkralik/GkSmarty/

Zend Framework 2 Module that provides a Smarty rendering strategy

  Sources   Download

The Requires

 

The Development Requires

zf2 module smarty