Download the PHP package hitsi/mezzio-smarty-renderer without Composer
On this page you can find all versions of the php package hitsi/mezzio-smarty-renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mezzio-smarty-renderer
Smarty Integration for Mezzio
Provides Smarty integration for Mezzio.
Installation
Install this library using composer:
Mezzio team recommend using a dependency injection container, and typehint against container-interop. We can recommend the following implementations:
- laminas-servicemanager:
composer require laminas/laminas-servicemanager
- pimple-interop:
composer require mouf/pimple-interop
- Aura.Di:
composer require aura/di
Configuration
You need to include the Hitsi\Mezzio\SmartyRenderer\ConfigProvider
in your
config/config.php
.
Optional configuration can be stored in config/autoload/templates.global.php
.
Paths
You can use multiple paths (namespaces) for templates
And render them
OR
In template
OR short description
Smarty Plugin
The included Smarty plugin adds support for url generation.
-
path
: Render the relative path for a given route and parameters. If there is no route, it returns the current path. -
url
: Render the absolute url for a given route and parameters. If there is no route, it returns the current url. -
absolute_url
: Render the absolute url from a given path. If the path is empty, it returns the current url. -
asset
Render an (optionally versioned) asset url.To get the absolute url for an asset:
Configuration Plugin
You need to include the Hitsi\Mezzio\SmartyRenderer\Plugins\ConfigProvider
in your
config/config.php
.
Optional you can add you own plugin like this.
Then use them
All versions of mezzio-smarty-renderer with dependencies
laminas/laminas-zendframework-bridge Version ^1.0
mezzio/mezzio-helpers Version ^5.0
mezzio/mezzio-router Version ^3.0
mezzio/mezzio-template Version ^2.0
psr/container Version ^1.0
smarty/smarty Version ^3.1