This plugin allows you to create arbitrary word aliases.
If you write down a word that has a defined alias, it will then be replaced with
the given text string. If that string is a string of the format <web>.<topic>
it will be replaced by an appropriate TWiki link. Aliases take only effect within the boundaries
if alias areas between %STARTALIASAREA% and %STOPALIASAREA% tags.
Aliases aren't replaced within html tags (<html tag ... TESTALIAS ... >), TWiki tags (%INCLUDE... TESTALIAS ...%) and TWiki links
([[TWiki.WebHome][TESTALIAS]]). A word can be prevented of being substituted by
prefixing it with <nop>.
Configuration
Configuration of this plugin is done by writing
your aliases into a specific topic which defaults to the topic defined
by the DEFAULT_ALIASES variable (see below). This topic is looked up
in the current web. If it does not exist in the current web, the plugin will fallback to
the DEFAULT_ALIASES in the TWiki.
Aliases defined in DEFAULT_ALIASES will be
used within the current web.
Aliases can be defined temporarily also, that is
they will only be taking effect within the current topic. Similarly, aliases can be
disabled. See the Syntax section for more details.
Syntax
This is the list of TWiki tags defined by this plugin.
display also the regular expression to match the alias
%ALIASES{"<topic>" merge="on,off"}%
use aliases defined in <topic> by either merging or redefining the set of current aliases
%ALIAS{name="..." value="..." [regex="..."]}%
defines an alias using regex to find it; if regex is not specified it defaults to the alias' name
%STARTALIASAREA%
mark the beginning of an alias area
%STOPALIASAREA%
mark the end of an alias area
%UNALIAS%
delete all aliases
%UNALIAS{name="..."}%,%UNALIAS{"..."}%
deletes one alias
The regex parameter in the %ALIAS{...}% tag might contain the two variables
$start and $stop that help to match the boundaries of an alias consisting of
non-alphabetic characters. Textile example:
On TWiki/Dakar: Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section. You might add %STARTALIASAREA% and %STOPALIASAREA% surrounding the %TEXT% tag of the view and preview templates of your TWikiSkins (e.g. view.pattern.tmpl and preview.pattern.tmpl) to enable the AliasPlugin sitewide.
On TWiki/Beijing: add the line marked with + to the script bin/view (a similar change must be added to the bin/preview script):
prevent nested alias expansion; support convenience aliases for anchors on the same page
09 Dec 2005:
added expl icite regex parameter for ALIAS
06 Dec 2005:
fixed deprecation warning on a dakar install; added support for non-alphabetical aliases; fixed use of uninitialized values due to special chars in alias patterns; the ALIAS tag in WebAliases can be used to define global aliases now
27 Apr 2005:
always read site aliases and then merge in web aliases