PHPackages                             wisembly/silexcms - 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. [Framework](/categories/framework)
4. /
5. wisembly/silexcms

ActiveLibrary[Framework](/categories/framework)

wisembly/silexcms
=================

Ultra lightweight CMS based on top of Silex

0.2.7(12y ago)231001MITPHPPHP &gt;=5.3.2

Since Jul 24Pushed 11y ago24 watchersCompare

[ Source](https://github.com/Wisembly/SilexCMS)[ Packagist](https://packagist.org/packages/wisembly/silexcms)[ RSS](/packages/wisembly-silexcms/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (14)Versions (10)Used By (0)

SilexCMS
========

[](#silexcms)

About
-----

[](#about)

This project aims to provide a minimal toolset helping to create corporate websites. Using [Silex](http://silex.sensiolabs.org/) as primary framework, it includes multiple shorthand classes.

Version
-------

[](#version)

0.1.0

Examples
--------

[](#examples)

We use SilexCMS for our coroporate website. You could see it live at wisembly.com and have a look to github.com/wisembly/wisembly

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

[](#documentation)

### Pages

[](#pages)

There is two kind of web pages : statics and dynamics.

Static pages does not rely on anything else than their templates. Dynamic ones take parameters in their urls, fetch a table, then render the specified template, storing the resulting objects in an accessible variable.

#### Static Page

[](#static-page)

```
$app->register(new SilexCMS\Page\StaticPage('/', 'home.html.twig'));
```

#### Dynamic Page

[](#dynamic-page)

```
$app->register(new SilexCMS\Page\DynamicPage('/product/{slug}', 'product.html.twig'));
```

```
{% if app.set not none %}
    Our product is called {{ app.set.name }} :)
{% else %}
    Product not found :(
{% endif %}

```

### DataSets

[](#datasets)

Datasets are an easy and handy way to retrieve database data directly in your Twig templates. First, register your available DataSets for your application:

```
$app->register(new DataSet('twig_name', 'table_name'));
$app->register(new DataSet('users', 'user'));
```

Then, use them in your Twig templates:

```
{# Tell in your template that you will need users DataSet loaded in app #}
{% bloc users %}{% endbloc %}

{# Then use it freely in your template in app var #}
First user name: {{ app.users[0].name }}

Users emails:
{% for user in app.users %}
  email: {{ user.email }}
{% endfor %}

```

### KeyValueSets

[](#keyvaluesets)

KeyValueSets are an easy and handy way to retrieve from your database key =&gt; values sets in your Twig templates. They work like DataSets above, but allows to access values differently in your templates.

```
$app->register(new DataSet('twig_name', 'table_name', 'key_name'));
$app->register(new DataSet('messages', 'messages', 'key'));
```

For the following set:

```
| key | value |
| foo | bar   |
| bar | baz   |

```

In your template you could then use:

```
{% bloc messages %}{% endbloc %}

{# will output "bar" #}
foo value is: {{ app.messages.foo }}

```

#### Foreign Twig extension

[](#foreign-twig-extension)

SilexCMS provides a Twig Extension to retrieve easily a particular object by id reference inside a DataSet

First, load Foreign Key Extension

```
$app['twig']->addExtension(new \SilexCMS\Twig\Extension\ForeignKeyExtension($app));
```

Then, use it that way in your Twig Templates:

```
{% block books %}{% endblock %}
{% block categories %}{% endblock %}
{% set category = foreign(app.categories, app.books[0].category_id) %}
The 1rst book category is: {{ category.name }}

```

### Security

[](#security)

The security classes give a very simple way to identifying some users.

When instanciating a Firewall, you will only have to provide a name and an array containing your users authentification infos (where the key will be their usernames and values are plain text passwords). A logger instance will be automagically created in the `app[name]` variable.

From then, you can use this logger to check current user state or change it.

#### Manual example

[](#manual-example)

```
$app->register(new SilexCMS\Security\Firewall('main', array('user' => 'pass')));

var_dump($app['main']->getUsername()); // null
$app['main']->bindUsername('user');
var_dump($app['main']->getUsername()); // "user"
```

#### Request example

[](#request-example)

You can also bind requests if they have at least two parameters : `_username` and `_password`.

##### startup.php

[](#startupphp)

```
$app->register(new SilexCMS\Security\Firewall('security', array('user' => 'pass')));

$app->register(new SilexCMS\Page\StaticPage('/login', 'login.html.twig'));
$app->register(new SilexCMS\Page\StaticPage('/login/success', 'login/success.html.twig'));
$app->register(new SilexCMS\Page\StaticPage('/login/failure', 'login/failure.html.twig'));

$app->post('/post', function (Application $app, Request $req) {
    $security = $app['security'];

    if ($security->bindSession()->getUserName() || $security->bindRequest($req)->getUserName()) {
        return $app->redirect('login/success');
    } else {
        return $app->redirect('login/failure');
    }
});
```

##### login.html.twig

[](#loginhtmltwig)

```

```

License
-------

[](#license)

SilexCMS is licensed under the MIT license.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.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 ~23 days

Recently: every ~42 days

Total

9

Last Release

4534d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11400ade55a71197808c548868ec15b5061fd4f88accaafcdd799beb40324403?d=identicon)[guillaumepotier](/maintainers/guillaumepotier)

---

Top Contributors

[![guillaumepotier](https://avatars.githubusercontent.com/u/496234?v=4)](https://github.com/guillaumepotier "guillaumepotier (67 commits)")[![arcanis](https://avatars.githubusercontent.com/u/1037931?v=4)](https://github.com/arcanis "arcanis (52 commits)")[![Taluu](https://avatars.githubusercontent.com/u/239685?v=4)](https://github.com/Taluu "Taluu (1 commits)")

---

Tags

frameworklibrarycmssilex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wisembly-silexcms/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M528](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M465](/packages/pimcore-pimcore)

PHPackages © 2026

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