PHPackages                             phpnomad/template - 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. phpnomad/template

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

phpnomad/template
=================

1.0.1(3w ago)03.8k[1 issues](https://github.com/phpnomad/template/issues)[1 PRs](https://github.com/phpnomad/template/pulls)3MITPHPCI passing

Since May 21Pushed 3w ago1 watchersCompare

[ Source](https://github.com/phpnomad/template)[ Packagist](https://packagist.org/packages/phpnomad/template)[ Docs](https://github.com/phpnomad/template)[ RSS](/packages/phpnomad-template/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (8)Used By (3)

phpnomad/template
=================

[](#phpnomadtemplate)

[![Latest Version](https://camo.githubusercontent.com/b7b22ffc340c76ead2a926fba9ebc5a1ed1afd376b6cfd1e1612ef17f97deddc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e6f6d61642f74656d706c6174652e737667)](https://packagist.org/packages/phpnomad/template)[![Total Downloads](https://camo.githubusercontent.com/36da6e7f5a9388905573662d635d4fb972e1fcaaa88b02cb560ad17edbe818ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e6f6d61642f74656d706c6174652e737667)](https://packagist.org/packages/phpnomad/template)[![PHP Version](https://camo.githubusercontent.com/a0407a7cf204b3e49eb1dca9ca46ebedbb3921996cdaece82e0cdd918e83fc58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068706e6f6d61642f74656d706c6174652e737667)](https://packagist.org/packages/phpnomad/template)[![License](https://camo.githubusercontent.com/f54f135f6b7ecebcda7df1e52a35682de4ec491e5a63c25afb8d97bc65ce35ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e6f6d61642f74656d706c6174652e737667)](https://packagist.org/packages/phpnomad/template)

`phpnomad/template` is the template rendering abstraction for PHPNomad applications. It defines a small set of interfaces that describe how a template name becomes rendered output, without committing to any particular template engine. The primary contract is `CanRender`, which takes a template path and a data array and returns a string. Companion interfaces handle path and URL resolution, and a screen resolver interface covers admin routing for plugins that need it. A plain-PHP engine ships with the package, and `phpnomad/twig-integration` provides a Twig-backed implementation that slots into the same contract.

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

[](#installation)

```
composer require phpnomad/template
```

Overview
--------

[](#overview)

- `CanRender` defines the render contract: a template path plus a data array returns a rendered string, or throws `TemplateException` if something goes wrong.
- `CanResolvePaths` and `CanResolveUrls` map a logical template name to a file path or a public URL, keeping callers free of filesystem assumptions.
- `ScreenResolverStrategy` covers admin and page-slug routing, including current-screen detection and URL generation for slug and action pairs.
- `RenderService` composes a path resolver with a `CanRender` implementation so application code passes a template name rather than an absolute file path.
- `PhpEngine` is the bundled default renderer. It appends `.php` to the resolved path, extracts the data array into scope, and captures the include through output buffering.

Documentation
-------------

[](#documentation)

Full documentation lives at [phpnomad.com](https://phpnomad.com), including how `phpnomad/core` exposes a `Template` facade for static access to the render service inside a running application.

License
-------

[](#license)

Released under the MIT license. See [LICENSE.txt](LICENSE.txt).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance96

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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 ~540 days

Total

2

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6206223bd6f2a57b8ac80605b1b5c3521faaec18ad3f20f25fb728a9a13784?d=identicon)[tstandiford](/maintainers/tstandiford)

---

Top Contributors

[![alexstandiford](https://avatars.githubusercontent.com/u/8210827?v=4)](https://github.com/alexstandiford "alexstandiford (11 commits)")[![malayladu](https://avatars.githubusercontent.com/u/708174?v=4)](https://github.com/malayladu "malayladu (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

frameworkphpphpnomadplatform-agnosticrenderingtemplate

### Embed Badge

![Health badge](/badges/phpnomad-template/health.svg)

```
[![Health](https://phpackages.com/badges/phpnomad-template/health.svg)](https://phpackages.com/packages/phpnomad-template)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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