PHPackages                             openclerk/pages - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. openclerk/pages

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

openclerk/pages
===============

0.2.2(8y ago)023111PHP

Since Apr 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/openclerk/pages)[ Packagist](https://packagist.org/packages/openclerk/pages)[ RSS](/packages/openclerk-pages/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (1)

Asset pipeline
--------------

[](#asset-pipeline)

The asset pipeline is designed so that you include all assets on every page. There is no automation for including multiple assets together.

Using
-----

[](#using)

Create a new folder `templates\` and create `templates\header.php` and `templates\footer.php` optionally (or else the framework will use the default supplied templates).

```
// inc/global.php

use \Pages\PageRenderer;
use \Openclerk\Router;

PageRenderer::addTemplatesLocation(__DIR__ . "/../templates");
PageRenderer::addStylesheet(Router::urlFor("css/default.css"));
PageRenderer::addJavascript(Router::urlFor("js/default.js"));
```

```

```

```
// site/index.php

use \Pages\PageRenderer;

$user = get_user();

PageRenderer::header(array("title" => "My page title"));
PageRenderer::requireTemplate("index", array('user' => $user));
PageRenderer::footer();
```

HAML
----

[](#haml)

You can also define templates with HAML syntax:

```
/ templates/index.haml

- if($user)
  %h2 Logged in successfully as #{$user}
- else
  %h2 Could not log in

!= link_to(url_for("index"), "Back home")
```

Events
------

[](#events)

A number of [events](https://github.com/openclerk/events) are triggered by the library, and can be captured for [metrics](https://github.com/openclerk/metrics):

- `pages_header_start`, `pages_header_end`
- `pages_footer_start`, `pages_footer_end`
- `pages_template_start`, `pages_template_end`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

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 ~289 days

Total

4

Last Release

3171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ebbec5ccc867054461adebb7c5b6312f8256f989ef96b124892e6e89724afdb?d=identicon)[soundasleep](/maintainers/soundasleep)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (19 commits)")

### Embed Badge

![Health badge](/badges/openclerk-pages/health.svg)

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

###  Alternatives

[structurizr-php/structurizr-php

Structurizr for PHP

170137.7k](/packages/structurizr-php-structurizr-php)[nami-doc/sprockets-php

Sprockets-PHP is Sprockets (Rails Asset Pipeline) for PHP

496.1k](/packages/nami-doc-sprockets-php)[alrik11es/calendar

An structured calendar generator in array, object or json format

131.1k](/packages/alrik11es-calendar)

PHPackages © 2026

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