This document discusses concepts regarding the staycms architecture.
It is a place to start if you want to add control functionality, features...
If you want to debug some strange problem...
Or even if you want to fork the project ;)
staycms/sf.php is the starting point for the running of the script itself.
More actions and modes will be added to staycms as its specifications mature and featureset expands.
Three parts of the CMS so far:
Content: what "page" from content namespace to show
Theme: the theme (overall look/feel)
The default action for the script to show a "page" from the configured namespaec.
This is where unique content is displayed based on the relevant "contentid".
The content is incorporated into a look and feel based on the "theme".
There are two planned ways to extend functionality of StayCMS.
One is by writing a module that conforms to StayCMS's specs.
The other will be adding extentions.
Extentions will modify how the CMS decides what to show (page/name).
Using modules is not as hard as it sounds, at least loading one is not.
Within a theme or content (usually in content) use the method
$mymodule = new $this->loadModule("nameofmodule");
From there, refer to the sf-Module's documentation, or peer into the public method definitions if there aren't any.
There a handful of modules packaged by default with StayCMS. ProcForm one of them, and it can be quite useful. There is sample content that illustrates how to use the module.
Creating new sf-Modules is not as hard as it sounds.
Simply create a class that extends sfmodule (as of 0.6).
Name the class sf%nameofmodule%. The class needs to be defined in a file which is named after itself as well, in the format of %nameofmodule%.inc.php inside of a folder named after itself in the form of %nameofmodule% inside of the module subdirectory of the sf-include folder. It's still easier than it sounds, just have a look at the "sf-include" folder you can see the form and procform folders/modules. Once a class is properly defined in this matter, arbitrary code can be written to define functionality. A good starting point will be the constructor function, which is run upon the module's load. The public functions of a module are typically called from the content. They can, also, be calld from the theme as well if appropriate.
Documentation © 2011-2012 Doug Bird. All Rights Reserved.
Staycms is © 2011 P.D.Bird.II. and is released under the terms of the FreeBSD License.
Generated Sun, 24 Sep 2017 13:57:01 -0700 by bldoc: © 2011 P.D.Bird.II. All Rights Reserved.