project page


SourceForge Logo
  Getting started| Project file| Definition file| Tag file| Source file| Functions| Template file

Definition file

comments are followed by double slash, e.g. //this is comment

typical definition is like this "definition = value", for example, "bgcolor = #ffffff", then to use the value #ffffff you only have to type [[bgcolor]], remember that Preppy is not made to save you some key strokes, but it's made for consistent website. For example, if you want to change a color you only need to change the value in the definition file.

To use as file alias, you will have something like this "sitemap = misc/site/sitemap.html", so to link to there you can use [[sitemap]] instead of the actual location. It makes update easier.

You can define sectional definition within <section sectionName> and </section sectionName> ,remember that sectional definition has a higher priority. For example, if a page belongs to the section "travel", and there is definition of "bgcolor" in default section (entries that are not inside any sections) and in the section travel, the one of the section travel will be used. Likewise, if no bgcolor is defined in the section travel, the default one will be used.

Definition can be nested, for example:
bgcolor = #ffffff
tablecolor = [[bgcolor]]

When you call a definition, the name is case-insensitive, so [[Bgcolor]] is the same as [[bgcolor]], and to escape a definition from being substituted, enclose it with double quotations, e.g. "[[bgcolor]]"

The main difference between definition and tag is that definition is single line and has only 2 priority levels, while tag can be multi-lines and has 3 priority levels.

Tag file


Copyright ©  2001 vaivai.com.All rights reserved.