PHPackages                             fhooe/latte-extensions - 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. fhooe/latte-extensions

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

fhooe/latte-extensions
======================

A collection of Latte extensions for other fhooe packages

v1.0.0(3mo ago)0103↑409.1%1MITPHPPHP ^8.5

Since Mar 24Pushed 3mo agoCompare

[ Source](https://github.com/Digital-Media/fhooe-latte-extensions)[ Packagist](https://packagist.org/packages/fhooe/latte-extensions)[ RSS](/packages/fhooe-latte-extensions/feed)WikiDiscussions main Synced 3w ago

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

fhooe/latte-extensions
======================

[](#fhooelatte-extensions)

A collection of Latte extensions for other *fhooe* packages used in the [Media Technology and Design](https://fh-ooe.at/en/degree-programs/media-technology-and-design-bachelor) program at the [University of Applied Sciences Upper Austria](https://fh-ooe.at/en/campus-hagenberg). It is intended to be used with packages such as [*fhooe/router*](https://github.com/Digital-Media/fhooe-router) or [*fhooe/router-skeleton*](https://github.com/Digital-Media/fhooe-router-skeleton), respectively.

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

[](#installation)

Integrate the package into your project using [Composer](https://getcomposer.org/):

```
composer require fhooe/latte-extensions
```

Contents
--------

[](#contents)

This package contains the following extensions:

### `RouterExtension`

[](#routerextension)

An extension to access the *fhooe/router* package from within Latte templates. It provides the following functions:

- `url_for("/some/route")`: Returns the full URL for the given route.
- `get_base_path()`: Returns the base path if the application is not in the server's document root.

### `SessionExtension`

[](#sessionextension)

Provides the function `session("someKey")`, which returns the value of the given key in the session. That way, not every needed entry in `$_SESSION` (or even the whole superglobal) must be passed to the template.

Usage
-----

[](#usage)

Register the extensions with your Latte engine, then use the provided functions in your templates:

### `RouterExtension`

[](#routerextension-1)

Register the extension and provide an instance of `Fhooe\Router\Router`.

```
$latte->addExtension(new Fhooe\Latte\RouterExtension($router));
```

Use the functions:

```
{url_for("/some/route")}
{get_base_path()}
```

This will output the full path for the route or a base path (if you need to prefix static paths for stylesheets or other files).

### `SessionExtension`

[](#sessionextension-1)

Register the extension:

```
$latte->addExtension(new Fhooe\Latte\SessionExtension());
```

Use the function:

```
{session("someKey")}
```

This will output the value of `$_SESSION["someKey"]`. If nothing is stored under that key, sessions are inactive, or the session superglobal is unavailable, an empty string will be returned so that you can use the function safely.

Contributing
------------

[](#contributing)

If you'd like to contribute, please refer to [CONTRIBUTING](https://github.com/Digital-Media/fhooe-latte-extensions/blob/main/CONTRIBUTING.md) for details.

License
-------

[](#license)

*fhooe/latte-extensions* is licensed under the MIT license. See [LICENSE](https://github.com/Digital-Media/fhooe-latte-extensions/blob/main/LICENSE) for more information.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

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

---

Top Contributors

[![hochleitner](https://avatars.githubusercontent.com/u/2236807?v=4)](https://github.com/hochleitner "hochleitner (16 commits)")

---

Tags

routingextensionssessionseducationlatte

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fhooe-latte-extensions/health.svg)

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

###  Alternatives

[contributte/latte

Extra contrib to nette/latte

111.5M2](/packages/contributte-latte)[nepada/form-renderer

Latte template based form renderer for Nette forms with full support for Bootstrap 3, 4 &amp; 5.

11252.5k](/packages/nepada-form-renderer)

PHPackages © 2026

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