crazedsanity/cs-content

Web application framework, MVC/templating system for PHP

v2.0.0-beta11 2016-09-14 03:09 UTC

README

Build Status

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

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

  • FileSystem: Build Status
  • Session: Build Status
  • Template: Build Status
  • Version: Build Status
  • (more to come)

HOW THE SYSTEM WORKS:::

TEMPLATE FILES:

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

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:

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:

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