PHPackages                             joseym/li3\_smarty - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. joseym/li3\_smarty

ActiveLi3-libraries

joseym/li3\_smarty
==================

Smarty PHP plugin for Lithium PHP ... if you're into that sort of thing

51081PHP

Since Jun 11Pushed 13y ago1 watchersCompare

[ Source](https://github.com/joseym/li3_smarty)[ Packagist](https://packagist.org/packages/joseym/li3_smarty)[ RSS](/packages/joseym-li3-smarty/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[Smarty](http://www.smarty.net) PHP plugin for [Lithium PHP](http://lithify.me)
===============================================================================

[](#smarty-php-plugin-for-lithium-php)

Adds Smarty Templating Engine support to Lithium PHP Framework.

I can't claim to be a fan of smarty, or php templating languages in general, but Smarty was a requirement from my employer.

So, alas, here is a plugin to run lithium thru smarty properly.

Installation
------------

[](#installation)

There are several ways to grab and use this project:

### Clone directly

[](#clone-directly)

1. Clone/Download the plugin into your app's `libraries` directory.
2. This is great for development but will require you go to this directory and manually pull any future changes

### Create a Submodule

[](#create-a-submodule)

In your app's `libraries` directory enter the following

```
git submodule add https://github.com/joseym/li3_smarty.git li3_smarty
```

> You could add this in your app path as well, just make sure you tell it to place the submodule in `libraries/li3_smarty` rather than just `li3_smarty`.

This is a great way to manage several plugins. If you add all of your libraries this way then you can stay up to date with all of them by running this command from your libraries directory (or wherever you created the submodule):

```
git submodule update
```

> This goes out and pulls all of the repos you have loaded into submodules. **Handy!**

### Composer

[](#composer)

#### This is new and Lithium doesn't yet have a packagist package (soon, hopefully)

[](#this-is-new-and-lithium-doesnt-yet-have-a-packagist-package-soon-hopefully)

That doesn't have to keep us from using it! It just means that we may have to take an extra step or two in order to get Composer running with Lithium. [See this highly instructive article](http://nitschinger.at/Playing-with-Composer-and-Lithium) by [@daschl](https://github.com/daschl) and lets do our best to make Lithium as easy to use as possible!

Modify your projects `composer.json` file

```
{
    "require": {
    	...
        "joseym/li3_smarty": "master"
        ...
    }
}
```

### Add it to Libraries

[](#add-it-to-libraries)

Tell your app to load the plugin by adding the following to your app's `config/bootstrap/libraries.php`:

```
