Skeleton CMS file structure

/skeleton
	/modules
		- php
	/system
		- core functionality
		/functions
		/classes
	/theme
		- css/javascript
		/icons
		/images
		/templates
			- html

Understanding the file structure of Skeleton is a lightbulb moment, so once you get it you can stop reading and move on. I suppose it's easiest just give some examples.

  1. There are 3 main directories included in Skeleton: /modules, /system and /theme.
    • /system is where I keep things like functions, classes and other php that is vital to the operation of the site I'm building.
    • /modules is where I put the backend or "under the hood" php for specific pages.
    • /theme is where I have images, stylesheets, javascript and most importantly the /templates folder - where all the templates are stored.
  2. Since the url of this page is http://www.greg-j.com/projects/skeleton/docs/file-structure, we'll use this page as an example:
    • Skeleton first looks for the file /modules/docs/file-structure.php. If it exists, Skeletal loads it into the output buffer. If it does not exist, Skeleton moves on.
    • Next, Skeleton looks for /theme/templates/docs/file-structure.php. If it exists, Skeletal loads it into the output buffer. If it does not exist, Skeletal calls up /theme/404.php.