quellabs/canvas-smarty

Smarty template engine integration for the Canvas PHP framework with contextual containers and automatic service discovery

Maintainers

Package info

github.com/quellabs/canvas-smarty

pkg:composer/quellabs/canvas-smarty

Statistics

Installs: 58

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.29 2026-03-10 09:25 UTC

This package is auto-updated.

Last update: 2026-03-10 09:28:10 UTC


README

A Smarty template engine integration for the Canvas PHP framework.

Installation

composer require quellabs/canvas-smarty

Requirements

  • PHP 8.3 or higher
  • Canvas framework

Usage

The Smarty template engine is automatically registered with Canvas through the service discovery system. No manual configuration required.

// In your Canvas controller
class HomeController
{
    public function index(TemplateEngineInterface $smarty) {
        return $smarty->render('home.tpl', [
            'title' => 'Welcome to Canvas',
            'user' => $user
        ]);
    }
}

Template Files

Place your Smarty templates in your Canvas application's template directory:

templates/
├── home.tpl
├── layouts/
│   └── app.tpl
└── partials/
    └── header.tpl

License

MIT License