PHITE directory layout
PHITE automatically generates navigation menus from the directory structure of a Web site. The site can be divided into sections, which are internally called subsites and identified by short signature strings such as
CONF (for the Conferences section). Top-level directories correspond to pages (note that there are no separate directories for the sections of a site), and may contain subdirectories that appear as subpages in the navigation menu. No further nesting is allowed.
Directory names must follow the general pattern
SIG is the subsite signature,
dd a two-digit number that determines the ordering of pages in the menu (other sort codes may also be used), and the rest of the directory name appears as a page name in the navigation menu. In addition, each section has a start page in the top-level directory
SIG_MAIN (shown as Overview in the menu) and the directory
GLOBAL contains default text blocks for the entire Web site.
Adding pages and sections
To add a page, simply create a new directory or subdirectory according to the naming conventions explained above (and don't forget to make it group writable). Initially, the page will show the same content as its parent or the corresponding section start page. You can now add the main body text of the page in a file named
body_some_mnemonic_text.inc), and optionally further text blocks in separate files. See Editing pages and Text blocks for further information.
Adding a section is slightly more complicated and requires editing the file
subsites.inc.php, where the signatures, names and order of the individual sections are defined. Choose a new subsite signature, say
EXTRA, then copy one of the existing entries in the file and adjust the signature, name (shown as main title of the page) and homepage name (shown in the section navigation bar). In our example, the new entry might look like this:
$sites['EXTRA'] = array( 'name' => "Multiword Expressions: Goodies", "homepagename" => 'Extras & Goodies', 'def_skin' => 'default' );
subsites.inc.php, you must also create a group writable directory for the start page of the section, named
EXTRA_MAIN in our case.
Since the pages and subpages of a PHITE Web site must be valid directory names, they should only contain ASCII alphanumeric characters, underscores and dashes. All other characters may not be fully portable, and whitespace should generally be avoided in filenames. In order to allow for special characters in page names, PHITE automatically converts all underscore (
_) characters in the page name part of a directory into blanks. In addition, certain “named entities” delimited by double underscores can e used to insert special characters such as parentheses. By default the following entities are defined:
__apos__ → ' __quot__ → " __amp__ → & __question__ → ? __exclaim__ → ! __colon__ → : __comma__ → , __period__ → . __lb__ → ( __rb__ → ) __ldots__ → …
Note that standard HTML entities are not recognised automatically! Further named entities can be added by modyfing the file
special_chars.inc.php in the top-level directory (the syntax should be obvious).
As an example, the directory
EXTRA_10_R__amp__D___lb__2008__rb__ defines a page named R&D (2008).