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

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

smalldb/template-sloth
======================

Slot-based template extension

1181PHPCI failing

Since Feb 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/smalldb/template-sloth)[ Packagist](https://packagist.org/packages/smalldb/template-sloth)[ RSS](/packages/smalldb-template-sloth/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Template Sloth
==============

[](#template-sloth)

Slot-based template extension.

See

...

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

[](#installation)

Using Composer:

```
composer require smalldb/template-sloth

```

Symfony's `config.yml` — add `sloth` service, it will register into Twig automatically:

```
services:
        sloth:
                class: Smalldb\TemplateSloth\Sloth
                arguments: [ '@twig' ]
```

Troubleshooting
---------------

[](#troubleshooting)

> Error: Unexpected "slot" tag (expecting closing tag for the "…" tag defined near line …) in …

This means the Sloth did not install the Twig extension. Is your dependency injection container configured properly?

Usage
-----

[](#usage)

```
$sloth = $this->get('sloth');
$sloth->setLayout('layout.html.twig', [ 'user' => 'Alice']);
$sloth->slot('content')->add(10, 'template.html.twig', [ 'foo' => 'bar' ];
$sloth->slot('content')->add(20, 'template.html.twig', [ 'foo' => 'foo' ];
return $sloth->response();
```

```
{% if 'content' is empty_slot %}
  No content available.
{% else %}
  {% slot 'content' %}
{% endif %}
```

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

[](#documentation)

See

License
-------

[](#license)

The most of the code is published under Apache 2.0 license. See [LICENSE](Resources/doc/license.md) file for details.

Contribution guidelines
-----------------------

[](#contribution-guidelines)

Project's primary repository is hosted at , feel free to submit issues there or create merge requests.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16572?v=4)[Josef Kufner](/maintainers/jkufner)[@jkufner](https://github.com/jkufner)

---

Top Contributors

[![jkufner](https://avatars.githubusercontent.com/u/16572?v=4)](https://github.com/jkufner "jkufner (24 commits)")

---

Tags

compositionregionsslotslotstwig-extension

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.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.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

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

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

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

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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