PHPackages                             jaxon-php/jaxon-latte - 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. [Templating &amp; Views](/categories/templating)
4. /
5. jaxon-php/jaxon-latte

ActiveLibrary[Templating &amp; Views](/categories/templating)

jaxon-php/jaxon-latte
=====================

Jaxon view renderer for the Latte template engine

v5.0.1(9mo ago)01891BSD-3-ClausePHP

Since May 26Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/jaxon-php/jaxon-latte)[ Packagist](https://packagist.org/packages/jaxon-php/jaxon-latte)[ Docs](https://github.com/jaxon-php/jaxon-latte)[ RSS](/packages/jaxon-php-jaxon-latte/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (8)Dependencies (2)Versions (11)Used By (1)

Jaxon View for Latte
====================

[](#jaxon-view-for-latte)

Render views with the [Latte template engine](https://latte.nette.org/) in Jaxon applications.

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

[](#installation)

Install this package with Composer.

```
"require": {
    "jaxon-php/jaxon-latte": "^5.0"
}
```

Usage
-----

[](#usage)

For each directory containing Latte templates, add an entry to the `app.views` section in the configuration.

```
    'app' => [
        'views' => [
            'demo' => [
                'directory' => '/path/to/demo/views',
                'extension' => '.latte',
                'renderer' => 'latte',
            ],
        ],
    ],
```

In the following example, the DOM element with id `content-id` is assigned the value of the `/path/to/demo/views/sub/dir/file.latte` template.

```
class MyClass extends \Jaxon\App\FuncComponent
{
    public function action()
    {
        $this->response->html('content-id', $this->view()->render('demo::/sub/dir/file'));
    }
}
```

Template functions
------------------

[](#template-functions)

This extension provides the following template functions to insert Jaxon js and css codes in the pages that need to show Jaxon related content.

```
// /path/to/demo/views/sub/dir/file.latte

{jxnCss()}

{jxnJs()}

{jxnScript()}
```

Call factories
--------------

[](#call-factories)

This extension registers the following template functions for Jaxon [call factories](https://www.jaxon-php.org/docs/v5x/ui-features/call-factories.html).

Note

In the following examples, the `$rqAppTest` template variable is set to the value `rq(Demo\Ajax\App\AppTest::class)`.

The `jxnBind` function attaches a UI component to a DOM element, while the `jxnHtml` function displays a component HTML code in a view.

```

        {jxnHtml($rqAppTest)}

```

The `jxnPagination` function displays pagination links in a view.

```

```

The `jxnOn` function binds an event on a DOM element to a Javascript call defined with a `call factory`.

```
    setColor(jq().val()))}>
        Black
        Red
        Green
        Blue

```

The `jxnClick` function is a shortcut to define a handler for the `click` event.

```
    sayHello(true))}>Click me
```

The `jxnEvent` function defines a set of events handlers on the children of a DOM element, using `jQuery` selectors.

```
    setColor(jq().val())]
        ['.ext-color-choice', 'change', $rqExtTest->setColor(jq().val())]
    ])}>

                Black
                Red
                Green
                Blue

                Black
                Red
                Green
                Blue

```

The `jxnEvent` function takes as parameter an array in which each entry is an array with a `jQuery` selector, an event and a `call factory`.

Contribute
----------

[](#contribute)

- Issue Tracker: github.com/jaxon-php/jaxon-latte/issues
- Source Code: github.com/jaxon-php/jaxon-latte

License
-------

[](#license)

The package is licensed under the BSD license.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance56

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~331 days

Recently: every ~267 days

Total

10

Last Release

295d ago

Major Versions

v2.0.x-dev → v3.0.02019-12-05

v3.0.0 → v4.0.02022-08-18

v4.x-dev → v5.0.02025-07-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebb668d7515d81741c86e42cf3194f5623636fbb15dd5412e26ea8320865d229?d=identicon)[lagdo](/maintainers/lagdo)

---

Top Contributors

[![feuzeu](https://avatars.githubusercontent.com/u/15174329?v=4)](https://github.com/feuzeu "feuzeu (40 commits)")

---

Tags

phptemplateviewajaxlattexajaxJaxon

### Embed Badge

![Health badge](/badges/jaxon-php-jaxon-latte/health.svg)

```
[![Health](https://phpackages.com/badges/jaxon-php-jaxon-latte/health.svg)](https://phpackages.com/packages/jaxon-php-jaxon-latte)
```

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[eftec/bladeonehtml

The standalone version Blade Template Engine from Laravel in a single php file

1018.1k5](/packages/eftec-bladeonehtml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
