What are the exact steps to add a new page?
Assuming you want a static content page, you go to /actions/static/ and make a new directory for the new page that's the identifier you want the page to be. For example let's make a "/dumb_page"
So make the folder:
/actions/static/dumb_page
make these two files:
/actions/static/pages/dumb_page/dumb_page.ini.php
/actions/static/pages/dumb_page/dumb_page.static
The first one contains information unique to the page such as the keywords or description, the latter contains the static markup to be plugged into <main>.
look at the default.ini.php:
; <?php die(); // prevent direct calls just in case
currentPage = "Home"
[meta]
keywords[name] = "keywords"
keywords[content] = "Default, Template, Poor, Man, Content, Management"
description[name] = "description"
description[content] = "Default Demo for Poor Man's Content Management"
currentPage is the text content of the menu item you want the "current" class to highlight. [meta] holds any meta you want set, the index of each you can make up so long as it's unique, [name] is the name attribute, [content] is the content attribute. I didn't go with name="content" because some ****wits at various search engines up and decided to make up their own blasted "property" attribute instead of using "name" so they could use otherwise invalid values. (aka "wah wah, I want a colon in name because I can't live with a hyphen" -- see the asshattery that is opengraph)
If you look at /test/ you can see that it uses a .content.php instead of a .static, where you have a function (action_content) example for when/if you need to plug values -- HTTP_ROOT for example -- into the markup with PHP, building semi-static sites.
The big difference being that .static is loaded via readfile, and .content.php is loaded via safeInclude.
But really, create that directory, create those two files, boom, new page.
If you want to make a dynamic page, you make a /action/
actionName directory, create a
actionName.startup.php that returns the $data of the operation. This $data array should include:
'contentFilePath' => 'actions/
actionName/
actionName[.
result]'
That will be used to load the corresponding .static or .content.php files.
Look at /actions/contact for an example. Note that "actions" can use both .content.php and .static (which load in that order), whilst with static it's either-or.
Basically, make a directory, make two files, done. Note that these files correspond to how one would/should access / store things in the database if one moves from file driven to content driven.