cross is now running Foswiki 2.1.3 Beta 1. Please open a task for any issues.
TIP AliasPlugin is not installed on


Define aliases which will be replaced with arbitrary strings automatically


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


Configuration of this plugin is done by writing your aliases into a specific topic, the WebAliases defining the WebAliases for the current web. Site-wide aliases can be defined in SiteAliases. Definitions are looked up in the given order:

  1. current topic
  2. current web's WebAliases
  3. Main.SiteAliases

Aliases are applied when saving a topic. The original form is encoded together with the replacement. The reverse operation is done before editing the topic.


This is the list of tags defined by this plugin.
Name Description
%ALIASES% display all aliases
%ALIASES{regex="on"}% 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
%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. Some textile examples:

%ALIAS{name="''" regex="$start''$stop" value="&rdquo;"}%
%ALIAS{name="``" regex="$start``$stop" value="&ldquo;"}%
%ALIAS{name="--" regex=" -- " value=" &mdash; "}%
%ALIAS{name="(c)" regex="$start\(c\)$stop" value="&copy;"}%
%ALIAS{name="(r)" regex="$start\(r\)$stop" value="&reg;"}%
%ALIAS{name="(tm)" regex="$start\(tm\)$stop" value="&trade;"}%
%ALIAS{name="..." regex="$start\.\.\.$stop" value="&hellip;"}%
%ALIAS{name=",," regex="$start,,$stop" value="&bdquo;"}%
%ALIAS{name="1/2" regex="$start1/2$stop" value="&frac12;"}%
%ALIAS{name="1/4" regex="$start1/4$stop" value="&frac14;"}%
%ALIAS{name="3/4" regex="$start3/4$stop" value="&frac34;"}%

Defined Aliases

%ALIAS{name="TESTLINK" value="System.WebHome"}% %ALIAS{name="TESTALIAS" value="yes"}% %ALIAS{name="rtfm" value="read the fine manual"}% %ALIASES%

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See for more help.

Change History

25 Aug 2011: minor compatibility fixes
09 Nov 2010: fixing error using takOutBlocks
07 Jun 2010: don't expand ADDTOZONE/ADDTOHEAD when parsing in alias definitions
12 Feb 2010: compatibility with newer foswiki engines
17 Nov 2009: complete rewrite not to apply aliases during view but during save
17 Apr 2009: converted to Foswiki plugin
28 Apr 2008: speed improvements
13 Nov 2007: Item4959: disabled settings in plugin topic, removed DEFAULT_ALIASES
14 Sep 2007: added view.alias.tmpl
13 Sep 2007: rewrite for modern wiki engines
10 Feb 2006: fixed use of uninitialized value (outch)
03 Feb 2006: 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
07 Apr 2005: Foswiki:Main/MichaelDaum: major rewrite
30 Mar 2005: Foswiki:Main/MichaelDaum: added alias area
  added fix to honor order of alias/unalias commands in a topic
23 Mar 2005: Foswiki:Main/MichaelDaum: added list of test-cases
  rewrite of substitution code
  improved configurability
22 Mar 2005: Foswiki:Main/MichaelDaum: prevent substitutions within html tags, wiki tags and links
21 Mar 2005: Foswiki:Main/MichaelDaum: allow arbitrary string substs
  configured via a list now (was tables)
  taking care not to replace inside html tags
1 Dec 2003: Foswiki:Main.NielsKoldso: Non WikiWord aliases as an option
  More alias prefixes allowed
16 Oct 2003: Speedup
09 Oct 2003: Initial Version

PackageForm edit

Author Othello Maurer, Michael Daum
Version 3.04
Release 25 Aug 2011
Description Define aliases which will be replaced with arbitrary strings automatically
Copyright 2003, Othello Maurer; 2003-2015, Michael Daum
License GPL (GNU General Public License)
Home Foswiki:Extensions/AliasPlugin
Support Foswiki:Support/AliasPlugin
ExtensionClassification Interface and Visualisation, User interactivity
ExtensionType PluginPackage
SupportUrl AliasPlugin
ModificationPolicy CoordinateWithAuthor
Topic attachments
I Attachment Action Size Date Who Comment
AliasPlugin.md5md5 AliasPlugin.md5 manage 156 bytes 26 Sep 2015 - 13:33 MichaelDaum  
AliasPlugin.sha1sha1 AliasPlugin.sha1 manage 180 bytes 26 Sep 2015 - 13:33 MichaelDaum  
AliasPlugin.tgztgz AliasPlugin.tgz manage 7 K 26 Sep 2015 - 13:32 MichaelDaum  
AliasPlugin.zipzip manage 9 K 26 Sep 2015 - 13:32 MichaelDaum  
AliasPlugin_installerEXT AliasPlugin_installer manage 4 K 26 Sep 2015 - 13:32 MichaelDaum  
Topic revision: r15 - 26 Sep 2015, MichaelDaum - This page was cached on 18 Jan 2017 - 22:50.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License