PHPackages                             masterpuffin/pesto - 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. masterpuffin/pesto

AbandonedArchivedLibrary

masterpuffin/pesto
==================

Pesto PHP Template Engine

011PHP

Since Feb 10Pushed 4y agoCompare

[ Source](https://github.com/MasterPuffin/Pesto)[ Packagist](https://packagist.org/packages/masterpuffin/pesto)[ RSS](/packages/masterpuffin-pesto/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Folder Structure
================

[](#folder-structure)

- `Cache` *must be writable by www-data*
- `Components`
- `Views`

Commads
=======

[](#commads)

`#Components = [,...]`
Defines the components that are available in the current template

`#Extends = []`
Defines another template which the templates expands into. Only one entry is possible

`@Varible`
Declares a variable in a custom component und renders the variable in the component itself

`#Block()  #Endblock`
Defines in which parent block the content inside this block should be rendered

`#Block()#Endblock`
Defines where the content from the child block should go

PHP variables declared inside a block can only be accesses inside this block. PHP variables declared outside a block can be accessed everywhere.

`{{  }}`
Echoes a PHP variable. Objects and arrays are supported. Variables are autoescaped.

Examples
========

[](#examples)

Example for rendering a template
--------------------------------

[](#example-for-rendering-a-template)

```
$p = new Pesto(__DIR__ . "/");
$p->enableCaching = false; #True or false

$r = $p->render('Page'); #Templatename without ending
echo $r;
```

Example for a template
----------------------

[](#example-for-a-template)

`Base.pesto.php`

```
#Components = [Alert]
>

    #Block(title)#Endblock

#Block(content)#Endblock

```

Example for an expending template
---------------------------------

[](#example-for-an-expending-template)

`Page.pesto.php`

```
#Components = [Alert]
#Extends = [Base]

#Block(title)
This is a title
#Endblock

#Block(content)

	Dies ist ein Text

		Moin

    {{ $news }}
    {{ $image->name }}

#Endblock
```

Example for a component
-----------------------

[](#example-for-a-component)

`Alert.pesto.php`

Be sure to wrap strings in quotes

```

    {{ @title }}
    {{ @attribute }}
    {{ @content }}
    {{ function( "@string", @variableOrInt }}

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

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.

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/masterpuffin-pesto/health.svg)

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

PHPackages © 2026

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