PHPackages                             maheswara/ci4smarty - 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. maheswara/ci4smarty

ActiveLibrary

maheswara/ci4smarty
===================

Integration Codeigniter 4 and Smarty Template Engine

v1.0.0(4y ago)1711MITPHPPHP ^7.1 || ^8.0

Since Apr 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jerry-maheswara-github/ci4smarty)[ Packagist](https://packagist.org/packages/maheswara/ci4smarty)[ Docs](https://github.com/jerry-maheswara-github/ci4smarty)[ RSS](/packages/maheswara-ci4smarty/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

ci4smarty
=========

[](#ci4smarty)

Integration Codeigniter 4 and Smarty Template Engine

Requirements
------------

[](#requirements)

- PHP 7.3+, 8.0+
- CodeIgniter 4.0.4+
- Smarty 4.1.0+

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

[](#installation)

Installation is best done via Composer. Assuming Composer is installed globally, you may use the following command:

```
> composer require maheswara/ci4smarty

```

Manual Installation
-------------------

[](#manual-installation)

Otherwise you can install manually:

1. Download **smarty** and **ci4smarty** and put in **app/ThirdParty** folder

    -
    -
2. Edit and add this line on **app/Config/Autoload.php**

    ```
     public $psr4 = [
         'Ci4Smarty'   => APPPATH . 'ThirdParty/ci4smarty-1.0.0/src'
     ];

     public $classmap = [
         'Smarty'   => APPPATH . 'ThirdParty/smarty-4.1.0/libs/Smarty.class.php',
     ];

    ```

Controller
----------

[](#controller)

The easy way to implement this, is by extends your controller from **SmartyController**.

```
use Ci4Smarty\Controllers\SmartyController;

class BaseController extends SmartyController{

}

```

Config
------

[](#config)

You can override config by adding file **SmartyConfig.php** to **app/Config** folder and change it

```
