PHPackages                             apex/syrus - 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. apex/syrus

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

apex/syrus
==========

Light-weight, extensible template engine.

2.1.11(2y ago)49581MITPHPPHP &gt;=8.1

Since Mar 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/apexpl/syrus)[ Packagist](https://packagist.org/packages/apex/syrus)[ Docs](https://apexpl.io)[ RSS](/packages/apex-syrus/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (42)Used By (1)

Syrus Template Engine
=====================

[](#syrus-template-engine)

A light weight, extensible template engine designed with separation of duties in mind, allowing both back-end developers and designers to complete their work independently. It supports:

- Standardized ` `composer require apex/syrus`

Table of Contents
-----------------

[](#table-of-contents)

1. Designers
    1. [Getting Started](https://github.com/apexpl/syrus/blob/master/docs/designers/getting_started.md)
    2. [File / Directory Structure](https://github.com/apexpl/syrus/blob/master/docs/designers/theme_structure.md)
        1. [Theme Structure](https://github.com/apexpl/syrus/blob/master/docs/designers/theme_structure.md#theme_structure)
        2. [Body Content Pages](https://github.com/apexpl/syrus/blob/master/docs/designers/theme_structure.md#body_pages)
        3. [Public Assets](https://github.com/apexpl/syrus/blob/master/docs/designers/theme_structure.md#public_assets)
    3. [Yield / Var Tags](https://github.com/apexpl/syrus/blob/master/docs/designers/yield.md)
    4. [Variables, foreach, and if / else Tags](https://github.com/apexpl/syrus/blob/master/docs/designers/variables.md)
    5. [&lt;s:...&gt; Template Tags](https://github.com/apexpl/syrus/blob/master/docs/designers/tags.md)
    6. [Using Multiple Themes](https://github.com/apexpl/syrus/blob/master/docs/designers/multiple_themes.md)
2. Developers
    1. [Syrus class / Container Definitions](https://github.com/apexpl/syrus/blob/master/docs/syrus.md)
        1. [site.yml Configuration File](https://github.com/apexpl/syrus/blob/master/docs/site_yml.md)
    2. [Render Templates](https://github.com/apexpl/syrus/blob/master/docs/render.md)
        1. [Auto-Routing](https://github.com/apexpl/syrus/blob/master/docs/autorouting.md)
        2. [Executing Per Template PHP Files](https://github.com/apexpl/syrus/blob/master/docs/execute_php.md)
        3. [Utilizing RPC Calls](https://github.com/apexpl/syrus/blob/master/docs/rpc.md)
    3. [Variables, Blocks and Callouts](https://github.com/apexpl/syrus/blob/master/docs/variables.md)
    4. [Content Loader (breadcrumbs, social media links, placeholders)](https://github.com/apexpl/syrus/blob/master/docs/content_loader.md)
    5. [Creating New `` Functional Tags](https://github.com/apexpl/syrus/blob/master/docs/create_tags.md)
    6. [StackElement Object](https://github.com/apexpl/syrus/blob/master/docs/stackelement.md)
    7. [Dummy Data for Designers](https://github.com/apexpl/syrus/blob/master/docs/dummy_data.md)
    8. [Caching](https://github.com/apexpl/syrus/blob/master/docs/cache.md)

Local Server
------------

[](#local-server)

Get Syrus up and running with the default web site by running the following command within the ~/public/ directory:

> `php -S 127.0.0.1:8180`

The default site including tag examples will now be available at . Alternatively, if you have docker-compose installed you may achieve the same by running the following command:

> `sudo docker-compose up -d`

Basic Usage
-----------

[](#basic-usage)

```
use Apex\Syrus\Syrus;

// Start
$syrus = new Syrus();

// Assign some variables
$syrus->assign('name', 'value');

// Assign array
$location = [
    'city' => 'Toronto',
    'province' => 'Ontario',
    'country' => 'Canada'
];
$syrus->assign('loc', $location);

// Add foreach blocks
$syrus->addBlock('users', ['username' => 'jsmith', 'email' => 'jsmith@domain.com']);
$syrus->addBlock('users', ['username' => 'mike', 'email' => 'mike@domain.com']);

// ADd error callout
$this->addCallout('Uh oh, there was a problem.', 'error');

// Render template
echo $syrus->render('contact.html');

// Or, use auto-routing and render template based on URI being viewed.
echo $syrus->render();
```

Support
-------

[](#support)

If you have any questions, issues or feedback for Syrus, please feel free to drop a note on the [ApexPl Reddit sub](https://reddit.com/r/apexpl/) for a prompt and helpful response.

Follow Apex
-----------

[](#follow-apex)

Loads of good things coming in the near future including new quality open source packages, more advanced articles / tutorials that go over down to earth useful topics, et al. Stay informed by joining the [mailing list](https://apexpl.io/) on our web site, or follow along on Twitter at [@mdizak1](https://twitter.com/mdizak1).

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 54.8% 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 ~27 days

Recently: every ~11 days

Total

41

Last Release

741d ago

Major Versions

0.2.2 → 2.02022-01-30

PHP version history (3 changes)0.1PHP &gt;=8.0.0

2.0PHP &gt;=8.0

2.1.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe486d2ed7db571c0519bb0d52b08b5e953a911936e87331e736a381ef96f29?d=identicon)[apex](/maintainers/apex)

---

Top Contributors

[![mdizak](https://avatars.githubusercontent.com/u/59886259?v=4)](https://github.com/mdizak "mdizak (23 commits)")[![apexpl](https://avatars.githubusercontent.com/u/56146521?v=4)](https://github.com/apexpl "apexpl (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apex-syrus/health.svg)

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

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k434.0k26](/packages/tightenco-jigsaw)[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.3M13](/packages/endroid-qr-code-bundle)[vincentlanglet/twig-cs-fixer

A tool to automatically fix Twig code style

3297.7M54](/packages/vincentlanglet-twig-cs-fixer)[spress/spress

Static site generator with blogs support

37536.1k](/packages/spress-spress)[iq2i/storia-bundle

UI Storia bundle

144.5k](/packages/iq2i-storia-bundle)

PHPackages © 2026

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