A site templating engine
This is the Septum reference.
Using Septum is easy. First of all, you must create a template (which should be 100% pure HTML, unfortunately server-side scripting is not supported) and call it template.src. Topic: Making a template The template is that section of your side that stays the same in all the pages. This is typically the section of the page that contains the sidebar, colors, styles, etc. You need to insert <tokens> wherever you want your content to go, and precede the template file with the “end keywords” token (the default is [[[END-KEYWORDS]]]). A sample template follows.
The [[[END-KEYWORDS]]] token is important, don’t forget to include it.
The page you create should be called <name>.pg, for example index.pg. You can change the default extension in the options. The page should have a <token> definition on one line followed by a colon and the text you want it to be replaced with on the following lines (HTML is permitted and, in fact, suggested). The end of each token should be signified with the “end token” tag, (the default is [[[END-TOKEN]]]). A sample page follows (this page will go into the template above).
To load a page, you need to specify its name. This is done by specifying the URL like this, http://yoursite/index.php?page=pagename. You can change the “index.php” part by renaming the main Septum file and the “page” part by editing the options in the source. Try the above example. If nothing is specified and the URL is just http://yoursite/ (assuming that Septum is called index.php), then it will try to load index.pg.
Tokens are placeholders for your text. You insert them in the template and when the user requests the page, they are automatically replaced with the text specified in the file. There are two kinds of tokens, ones that take parameters and ones that don’t. The ones that don’t take parameters are just expanded to the specified text. The ones that do take parameters can be expanded into different text, depending on the parameters. For example, say you need to have a custom link on your side so that all the links open on a separate frame and through Septum. The syntax is the following.
Then you would use [[[?LINK|mypage|link to my page]]] in the page, and it would be expanded to <A HREF=”index.php?page=mypage” target=”_top”>link to my page</A>. You can have nested tags, one inside the other.
This program is released under the GNU GPL. The latest news and updates can be found at http://septum.sf.net.
You can download Septum from SourceForge (http://sourceforge.net- /project- /showfiles.php?group_id=125013- &package_id=137225- &release_id=286887). a href=”http://sourceforge.net"><img src=”http://sourceforge.net- /sflogo.php?group_id=125013- &type=1" width=”88” height=”31” border=”0” alt=”SourceForge.net Logo” /></a