Page templates
Page templates are (X)HTML pages that determine the overall layout of the content. As a sandwich analogy, the
header and footer are the slices of bread and the page templates are the meats and lettuce and suchlike.
Each template has its own special tags. Put a tag in a particular part of your template to automatically insert the appropriate content at that point. Tags are case-sensitive and use curly braces (above the square brackets on a keyboard). The names of these files must not be changed (don't even change the extension to .html).
The default template included with Ligature looks like poo. Get creative!
404.htm
The page shown if an item can't be found, doesn't exist or was searched for with a disallowed query string.
It takes no variables or special codes: use only straight HTML. Note that this 404 page is only called when a story is not found: it is not called when a page doesn't exist. You still need to use your server's configuration (whether .htaccess or otherwise) to give a general 404 page.
story.htm
Defines how the story will appear.
{NUMBER}: the ID number of the story. Use as page numbers, for example!
{TITLE}: the Noun this story is written for, displayed with an initial capital ("Shoe" or "Bread").
{TITLE_LC} the Noun this story is written for, displayed in all lowercase ("shoe" or "bread").
HEY! You can use these two TITLE tags to serve up dynamic content by putting them inside the HTML. The file you are trying to call up will need to be named appropriately: for a picture called "Bread.jpg" (notice initial capital) you would use
<img src="{TITLE}.jpg" />. For a picture named "bread.jpg" (all lowercase) you would use
<img src="{TITLE_LC}.jpg" />
{BODY}: the body of the story.
{DATE}: the date and time this story was published, as you
chose to format it during installation (can be changed at the Edit Settings page).
{RANDOM}: Outputs a link to a random story, the link text being the first sentence of that story (or the first 75 characters plus an ellipsis, if it is a long sentence).
HEY! If you don't like how {RANDOM} behaves and would rather use your own link, just add a 'random' flag to index.php, for example
<a href="index.php?random">Read a random story</a>.
{PREV}: Places a link to the story that came before this one.
{NEXT}: Places a link to the story that comes after this one.
HEY! If you want to change how these Prev and Next links appear, go to admin/control.php. You'll find four variables to edit: $nextstory_is, $prevstory_is, $neweststory_is and $oldeststory_is. Use {URL} in place of an actual URL in your link code when editing these options, as in
<a href="{URL}">.
toc.htm
Defines how the Table of Contents (sitemap) will look. This is where you can add static links to an About page, Contact page and others.
{NOUNS}: Lists all of the existing stories alphabetically and as list items (between <li>...</li> tags). It is your choice whether to put the {NOUNS} command between <ol> or <ul> tags.
If you make a link to toc.php?bydate then that will order all of the stories by date, most recent first.
Back to top