PHPackages                             juanchosl/templaterender - 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. juanchosl/templaterender

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

juanchosl/templaterender
========================

A small, lightweight tool in order to render templates

1.0.5(4mo ago)044MITPHPPHP ^7.1 || ^8.0

Since Jun 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/JuanchoSL/TemplateRender)[ Packagist](https://packagist.org/packages/juanchosl/templaterender)[ Docs](https://github.com/JuanchoSL/TemplateRender)[ RSS](/packages/juanchosl-templaterender/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

TemplateRender
==============

[](#templaterender)

Description
-----------

[](#description)

A small, lightweight utility to render templates

Install
-------

[](#install)

```
composer require juanchosl/templaterender
```

How use it
----------

[](#how-use-it)

Load composer autoload and use the JuanchoSL\\TemplateRender class

```
$template_render = new TemplateRender(TEMPLATES_DIR, 'tpl.php');
$templates_render->setVar('title','Title of the page');
echo $templates_render->render('index', ['subtitle' => 'This is a subtitle']);
```

On *index.tpl.php* we can have:

```
getVar('title'); ?>

getVar('subtitle'); ?>
```

We can include other templates from the original templates using *fetch* method, for use menu.tpl.php

```
getVar('title'); ?>

getVar('subtitle'); ?>
fetch('menu'); ?>
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance79

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~157 days

Recently: every ~144 days

Total

7

Last Release

126d ago

### Community

Maintainers

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

---

Top Contributors

[![JuanchoSL](https://avatars.githubusercontent.com/u/18701207?v=4)](https://github.com/JuanchoSL "JuanchoSL (50 commits)")

---

Tags

template

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/juanchosl-templaterender/health.svg)

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

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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