PHPackages                             crazedsanity/cs-content - 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. crazedsanity/cs-content

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

crazedsanity/cs-content
=======================

Web application framework, MVC/templating system for PHP

v1.3.0(10y ago)1850[13 issues](https://github.com/crazedsanity/cs-content/issues)2MITPHPPHP &gt;=5.3.0

Since Jan 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/crazedsanity/cs-content)[ Packagist](https://packagist.org/packages/crazedsanity/cs-content)[ Docs](https://github.com/crazedsanity/cs-content)[ RSS](/packages/crazedsanity-cs-content/feed)WikiDiscussions master Synced 3d ago

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

CS Content System (Templating / MVC Framework)
==============================================

[](#cs-content-system-templating--mvc-framework)

[![Build Status](https://camo.githubusercontent.com/88768bd7af4998a4cbe7abc00a2d6a689e0491ca73b387e3f02ba8737e8a9fb4/68747470733a2f2f7472617669732d63692e6f72672f6372617a656473616e6974792f63732d636f6e74656e742e706e67)](https://travis-ci.org/crazedsanity/cs-content)

Generic MVC-style framework designed to leverage the power of a templating system and PHP includes, all running through a single display script. Allows incredibly fast building of an intelligent website without having to write a script for every page. Separate HTML from code, intelligently build pages using path-based script and template inheritance.

NOTICE
------

[](#notice)

CS-Content is being broken down into a series of smaller libraries, installable via Composer + Packagist. The list of packages:

- FileSystem: [![Build Status](https://camo.githubusercontent.com/8a8d2748054c7254a8982d7aa6b5b27f343ef5999d40d6585c72a480fe77bc1b/68747470733a2f2f7472617669732d63692e6f72672f6372617a656473616e6974792f66696c6573797374656d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/crazedsanity/filesystem)
- Session: [![Build Status](https://camo.githubusercontent.com/25a66defc7e5f0ebbc187833fe009224c9e0f510e0e79db18b8f3e181c7b92e7/68747470733a2f2f7472617669732d63692e6f72672f6372617a656473616e6974792f73657373696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/crazedsanity/session)
- Template: [![Build Status](https://camo.githubusercontent.com/22f5e397956071e3a673cd98592c604d6970e7046153155197f0076e86271127/68747470733a2f2f7472617669732d63692e6f72672f6372617a656473616e6974792f74656d706c6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/crazedsanity/template)
- Version: [![Build Status](https://camo.githubusercontent.com/c6a76964902fff72e2bd4913dca3b97871928eef7074f2c3e64e5dcb45f964c1/68747470733a2f2f7472617669732d63692e6f72672f6372617a656473616e6974792f76657273696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/crazedsanity/version)
- (more to come)

HOW THE SYSTEM WORKS:::
-----------------------

[](#how-the-system-works)

### TEMPLATE FILES:

[](#template-files)

Automatically loads templates based on the URL, and optionally includes scripts in the includes directory.

### MAIN SECTION:

[](#main-section)

For the main section, i.e. "/content", it requires a template in a directory of that name beneath /templates, with a file called "index.content.tmpl"... i.e. /templatee/content/index.content.tmpl.

### SUB SECTIONS:

[](#sub-sections)

For any subsection to be valid, i.e. "/content/members", it must have an associated template, e.g. "/templates/content/members.content.tmpl". If a subdirectory with an index.content.tmpl file exists, it will be used instead of the file in the sub directory (i.e. "/templates/content/members/index.content.tmpl").

### SUB SECTION TEMPLATE INHERITANCE:

[](#sub-section-template-inheritance)

All pages load the base set of "shared" templates, which are in the form "

.shared.tmpl" in the root of the templates directory. Shared files within each directory, in the form ".shared.tmpl", will be loaded for ANY subsection.For any subsection, it inherits a previous section's templates in the following manner (any "content" templates are ignored for inheritance, as they're require for page load).

```
/content							---> /templates/content/index.*.tmpl

/content/members					|--> /templates/content/index.*.tmpl
									`--> /templates/content/members.*.tmpl

/content/members/test				|--> /templates/content/index.*.tmpl
									|--> /templates/content/members.*.tmpl
									|--> /templates/content/members/index.*.tmpl
									`--> /templates/content/members/test.*.tmpl

```

### AUTOMATIC INCLUDES:

[](#automatic-includes)

Much in the same way templates are included, so are scripts, from the /includes directory, though the logic is decidedly simpler: all scripts must have the extension of ".inc", and must have either the section's name as the first part of the filename, or "shared". Shared scripts will be loaded for ALL subsections.

### INCLUDES INHERITANCE:

[](#includes-inheritance)

The template inheritance scheme is as laid-out below. The content system will go as far into the includes directory as it can for the given section, regardless of if any intermediate files are missing.

It is important to note that the content system will NOT regard a section as valid if there are include scripts but no templates.

```
/content							|--> /includes/shared.inc
									`--> /includes/content.inc

/content/members					|--> /includes/shared.inc
									|--> /includes/content.inc
									|--> /includes/content/shared.inc
									`--> /includes/content/members.inc

/content/members/test				|--> /includes/shared.inc
									|--> /includes/content.inc
									|--> /includes/content/shared.inc
									|--> /includes/content/members.inc
									|--> /includes/content/members/shared.inc
									`--> /includes/content/members/test.inc

```

License
=======

[](#license)

Copyright (c) 2013 "crazedsanity" Dan Falconer Dual licensed under the MIT and GPL Licenses.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Recently: every ~0 days

Total

19

Last Release

3530d ago

Major Versions

v1.3.0 → v2.0.0-beta12015-08-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5c258da2d3360da7bc80c01e0a97ff96a036cef58f8a5434daf469ad7cc186?d=identicon)[crazedsanity](/maintainers/crazedsanity)

---

Top Contributors

[![crazedsanity](https://avatars.githubusercontent.com/u/1490894?v=4)](https://github.com/crazedsanity "crazedsanity (83 commits)")

---

Tags

phptemplatingmvcdryoaoo

### Embed Badge

![Health badge](/badges/crazedsanity-cs-content/health.svg)

```
[![Health](https://phpackages.com/badges/crazedsanity-cs-content/health.svg)](https://phpackages.com/packages/crazedsanity-cs-content)
```

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[goetas/twital

PHP templating engine that combines Twig and PHPTal power points

12813.1k1](/packages/goetas-twital)[goetas/twital-bundle

Twital templating engine Symfony Bundle

206.8k](/packages/goetas-twital-bundle)[eftec/bladeonehtml

The standalone version Blade Template Engine from Laravel in a single php file

1018.1k5](/packages/eftec-bladeonehtml)

PHPackages © 2026

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