## Find Elsewhere Plugin
This plugin will automatically link to another web(s) if a topic isn't found in the current web.
This is useful for a TWiki site that wants to implement a glossar/dictionary web where common terms are defined and stored. Without this plugin:
* Each web would need to create their own topic for a common term
* Link to or INCLUDE the topic from where it is defined
* Authors need to remember to put the Web name in front of the topic name, such as [[TWiki/WikiWord]]
Without this kind of plugin, it's likely that common terms used within an organization will be defined in multiple webs or the common terms will be unlinked wiki words (as if they didn't exist).
### Syntax Rules
No new rules are introduced. However, new automatic [[TWiki/WikiWord]] linking will occur.
If a topic is not found in the current web, this plugin will look in the LOOKELSEWHERE web list for that topic. If and when the topic is found as it looks through the webs in their listed order, it will create a link to that page using the [[ ]] syntax.
New Functionality
test case |
input |
output |
expected |
found here |
WebHome |
Web Home? |
WebHome |
found singular here |
WebHomes |
Web Homes? |
WebHomes |
found elsewhere |
TWikiAdminGroup |
TWiki Admin Group? |
Main.TWikiAdminGroup |
found singular elsewhere |
TWikiAdminGroups |
TWiki Admin Groups? |
Main.TWikiAdminGroups |
Don't break other types of links...
input |
output |
%TOPIC%#TopicAnchor |
%TOPIC%#NewFunctionalityTest |
TWiki.WebHome |
Web Home? |
WebHome |
Web Home? |
[[TWiki.WebHome]] |
TWiki.Web Home? |
[[TWiki.WikiWord]] |
TWiki.Wiki Word? |
[[TWiki.WikiWords]] |
TWiki.Wiki Words? |
TWiki.WikiWord |
Wiki Word? |
TWiki.WikiWords |
Wiki Words? |
### %TOPIC% Settings
* One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic:
* Set SHORTDESCRIPTION = If a topic isn't found in this web it will look in a predefined list of other webs and attempt to find it there.
* List other webs in which to look for topics that don't exist
* Set LOOKELSEWHERE = TWiki, Main
* If the [[TWiki/WikiWord]] is plural but doesn't exist, also look for the singular word. Note this setting is for looking in **other** webs only (plural to singular is still automatically done in the current web).
* Set PLURALTOSINGULAR = 1
* Debug plugin: (See output in `data/debug.txt`)
* Set DEBUG = 0
### Plugin Installation Instructions
* Download the ZIP file from the Plugin web (see below)
* Unzip **%TOPIC%.zip**
in your twiki installation directory. Content:
File: |
Description: |
data/TWiki/%TOPIC%.txt |
Plugin topic |
data/TWiki/%TOPIC%.txt,v |
Plugin topic repository |
lib/TWiki/Plugins/%TOPIC%.pm |
Plugin Perl module |
* Test if the plugin is correctly installed, by viewing %TOPIC%#NewFunctionalityTest
### Plugin Info
**_Related Topics:_** %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins, [[DefaultPlugin]]
-- [[Main/MikeBarton]] - 1 Feb 2002