PHPackages                             corex/site - 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. corex/site

AbandonedArchivedLibrary

corex/site
==========

Site (layout/view, theme, ...)

2.1.1(5y ago)025MITPHPPHP ^7.2

Since Dec 24Pushed 5y agoCompare

[ Source](https://github.com/corex/site)[ Packagist](https://packagist.org/packages/corex/site)[ RSS](/packages/corex-site/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Site
====

[](#site)

[![License](https://camo.githubusercontent.com/ef8b64edc4fdb80ff4407286d2b521b9ce6976200d32c8ed3a62520700cf3446/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f7265782f736974652e737667)](https://camo.githubusercontent.com/ef8b64edc4fdb80ff4407286d2b521b9ce6976200d32c8ed3a62520700cf3446/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f7265782f736974652e737667)[![Build Status](https://camo.githubusercontent.com/2f9a085faf8de4dc0adb65930b20e899e5ef7491e7e680c87ef2d10e2b92af76/68747470733a2f2f7472617669732d63692e6f72672f636f7265782f736974652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/2f9a085faf8de4dc0adb65930b20e899e5ef7491e7e680c87ef2d10e2b92af76/68747470733a2f2f7472617669732d63692e6f72672f636f7265782f736974652e7376673f6272616e63683d6d6173746572)[![codecov](https://camo.githubusercontent.com/36afe9b5b08685082221965e8340ee85de70b4a54e4f1df18c788d723b305528/68747470733a2f2f636f6465636f762e696f2f67682f636f7265782f736974652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://camo.githubusercontent.com/36afe9b5b08685082221965e8340ee85de70b4a54e4f1df18c788d723b305528/68747470733a2f2f636f6465636f762e696f2f67682f636f7265782f736974652f6272616e63682f6d61737465722f67726170682f62616467652e737667)

The purpose of this package is to keep it simple and make it possible to quickly setup a site (html, template). Setting up a site is easy and requires only few steps.

Templates (Layout / View)
-------------------------

[](#templates-layout--view)

Layouts and views are based on package corex/template (mustache). Look at readme for package corex/template to see syntax.

- Standard template (standard.html) is a simple html template and is default.
- If bootstrap theme is specified, a bootstrap template (bootstrap-x.y.z.html) is used instead of simple html template.
- It is possible to set specific Bootstrap version by calling Bootstrap::setVersion(Bootstrap::VX\_Y\_Z);. If not specified, latest version is chosen.
- It is possible to override templates by setting a new path and use the same name.
- A layout contains main template for a page. It is possible to override standard template by setting a new location for layout templates. It is also possible to specify a new template name.
- A view is a simple template i.e. the body.
- A view can be used inside a view. It is automatically rendered.

Following variables are supported

- title - Ttle of page.
- body - Body og page.
- error - Error message placed on top of page.

Bootstrap versions supported: 4.5.2, 4.3.1, 4.1.3

Config
------

[](#config)

```
// Set/add a path where to load layout templates from.
Config::setLayoutPath($path);

// Set/add a path where to load view templates from.
Config::setViewPath($path);

// Set theme for layout. Default is 'bootstrap'. See Theme::* for constants.
Config::setTheme(Theme::UNITED);
```

Examples
--------

[](#examples)

### Theme "slate", inject view with some text into a layout.

[](#theme-slate-inject-view-with-some-text-into-a-layout)

```
Config::setTheme(Theme::SLATE);
$view = View::load('test')->variable('message', 'Some text');
$layout = Layout::load()->variables([
    'body' => $view
]);
print($layout);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Total

4

Last Release

1923d ago

Major Versions

1.0.0 → 2.0.02019-07-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/2168107cb28f49e937f963a925553ebac5923aa27cad2e1cf90ddbcabf663d6d?d=identicon)[corex](/maintainers/corex)

---

Top Contributors

[![corex](https://avatars.githubusercontent.com/u/21259173?v=4)](https://github.com/corex "corex (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/corex-site/health.svg)

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

PHPackages © 2026

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