Skip to main content.

Editing pages

The main body text of a page is contained in a file body.inc in the page directory (see Directory layout for more information). Optionally, a mnemonic suffix introduced by an underscore character (_) may be added before the extension .inc, e.g. body_conf_2008.inc. There must be only a single body text file in each directory, though (otherwise PHITE will silently use the first one found). If the directory does not contain a body.inc file, the page inherits its body text from the parent page or the start page of its section.

The body.inc file may contain either plain text (in HTML format, i.e. special characters must be escaped as entities), HTML code (as you would put in the <body> element of a HTML page, but without the <body> … </body> tags) or HTML code mixed with PHP (in the usual <?php … ?> delimiters). Note that all pages must use UTF-8 encoding if they contain non-ASCII characters. Links to other subpages can be inserted by copying URLs from the automatically generated navigation menu, but should generally be avoided as they will break when pages are renamed. The recommended strategy is to point readers to navigation menu entries in the text, e.g. “click on Text blocks for more information”.

Links to images and other files cannot use relative paths within the page or subpage directory, since the page is always accessed through the PHITE.php script in the top-level directory. It is recommended to put such files in a global top-level directory and then specify a relative path, e.g. <img src="images/face-smile.png"> for . Advanced users can also embed PHP code to access local data directories (see Advanced features).

Links as menu entries

Entries in the navigation menu can also directly link to remote pages. For this purpose, put a file named redirect.inc or redirect_some_mnemonic_suffix.inc in the page directory instead of body.inc. This redirect file only contains the URL of the target page. A trick can be used to open such links in new windows, viz. by specifying the URL in the form

http://www.sourceforge.net/" target="_blank