Skip to main content.

Right block example

This is an example of a message box you can add on the right-hand side of a page.

Put text in paragraphs to ensure nice spacing (or just have a single block of plain HTML text).

Lists in message boxes (right blocks)

Message boxes can also contain bulleted

  • list item 1
  • list item 2
as well as enumerated lists:
  1. one
  2. two
  3. three
These are not guaranteed to format nicely in all broswers yet and should be used sparingly.

Defining text blocks

In addition to the main body text of a page, PHITE offers a flexible mechanism for assembling content from small text blocks defined in separate files. There are three different types of blocks: left blocks (LB) appear below the navigation menu on the left and are formatter in a similar, unobtrusive style (in the default skin); center blocks (CB) are appended to the main body text and look like regular sections with a <h1> heading; right blocks (RB) appear as highlighted information boxes on the right-hand side of the page and should be used sparingly. Examples of all three block types are shown on this page.

Text block files may contain the same formats (plain text, HTML code and PHP) as the main page body. If no text blocks of a given type are defined for the current page, they are inherited from the parent page or the section's main page.

Naming conventions for text blocks

Text block files use the same naming conventions as PHITE directories. Filenames must have the form

  TT_dd_Text_block_heading.inc

where TT identifies the block type (LB, CB or RB) and the two-digit number dd determines the ordering of multiple blocks of the same type. The rest of the filename is used as a heading for the text block, with underscores and named entities converted in the same way as for directories (details are repeated below). Note the mandatory .inc filename suffix.

The text block examples on this page are defined in files named

  ./LB_10_Left_block_example.inc
  ./LB_20_More_left_blocks.inc
  ./LB_30_SourceForge_site_logo.inc
  ./CB_10_Center_block_example.inc
  ./CB_90_Special_characters.inc
  ./RB_10_Right_block_example.inc
  ./RB_20_Lists_in_message_boxes___lb__right_blocks__rb__.inc

Center block example

This is an example of a center block. Note that it is indistinguishable from the headed section above, and can use the same range of formatting options as the body text of the page. As another example, the named entities for special characters (from the Directory layout page) are shown below. They were defined as a separate center block in order to facilitate repetition on other pages.

Special characters

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).