Theming Anuech is relatively easy. There are two variables that control the theme, $Header and $Footer. $Header controls all of the code and text that is above individual page content (including HTML, CSS, etc), and $Footer controls everything after the individual page content.

As of version 0.10 there is no "theme framework" with which one could install/activate a theme. The way to do it is either set $Header and $Footer directly in your config.pl file, or create a plugin to set the variables.

There are several variables which can be included within either the $Header or $Footer variables that will be interpolated when being sent out to the browser. They are:

$SiteName: - Displays what is set for $SiteName (useful for <title> elements)

$PageName: - Displays the current page name (underscores are replaced by spaces, so 'This_is_a_test' would be 'This is a test'

$VERSION: - The current version of Aneuch, useful for including a generator meta (but not necessary)

$NavBar: - Shows the navigation bar, which includes the default page and RecentChanges by default. $NavBar can be set directly in the config.pl file, or pages can be added to it by being included in the @NavBarPages variable.

$ShortPage: - Interchangeable now with $Page (in extremely early versions of Aneuch, $Page and $ShortPage were separate, however by public release time these variables now contain the same data. In time I will completely remove one in favor of the other). Will show the page name, such as 'ThisIsATest' or 'This_is_a_test' (spaces replaced by underscores). This variable is the file name on the back-end.

$Url and $ShortUrl: - $Url contains the full URL to the site, i.e. 'http://aneuch.myunixhost.com/'. $ShortUrl only contains everything beyond the domain root (i.e. .com, .net, .org). In the example just given, $ShortUrl would be '/'. If your full $Url were 'http://my.website.com/wiki/' then $ShortUrl would be '/wiki/'. You can use either in a theme, however in the default theme $ShortUrl is primarily used.

$DiscussText: - Displays the link (and text) for the Discussion page (if enabled). If on a discussion page, the link (and text) will point back to the original page.

$EditText: - Displays the link (and text) to edit the current page. Will show "This page is read only" if the page is not editable.

$RevisionsText: - Displays the link (and text) to the page history.

$Mtime: - Will show the last modified time of the current page, if any. Will be appended with the search form (in future versions, I will find another way to include the search form)

$PostFooter: - Anything else that a site administrator may wish to include before the close of the footer (such as a copyright notice, license notice, etc).

$DebugMessages: - Optional! If site admin has set $Debug to 1, this variable will contain all error messages encountered during the execution of the script (useful for site admins to figure out why something isn't working, or for Aneuch developers to see where something has broken).


CategoryDocumentation