Find Elsewhere Plugin
Automatically link to another web(s) if a topic isn't found in the current web.
This plugin is useful - for example - for a TWiki site that wants to implement a glossary/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
- Or need to link to or INCLUDE the topic from where it is defined
- Authors would 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 or acronyms (abbreviations) used within an organization would be defined in multiple webs or the common terms will be unlinked wiki words (as if they didn't exist).
Syntax Rules
No new syntax is introduced. However, new automatic
WikiWord linking will occur.
If a topic or abbreviation is not found in the current web, this plugin will look through the webs listed in the LOOKELSEWHEREWEBS variable. If the topic is found (as it looks through the webs in their listed order), it will create one or more links, depending on the number of topics found.
Single hits
(Note: FindElsewherePlugin doesn't support
<noautolink> in TWiki-3; WebSearch will be found anyway if you're still using this codebase) |
Multiple hits
If a word is found in two or more LOOKELSEWHERE webs, a special syntax is used:
- Standard WikiWord: TWikiPreferences(TWiki,Main)
- [[Spaced wiki word]]: TWiki preferences(TWiki,Main)
Create this table in
Sandbox.FindElsewherePluginTest to try it out (use raw edit when pasting):
| *Test case* | *Input* | *Output<br />(if installed)* | *Expected* |
| Found elsewhere, spaced wiki word | [<nop>[TWiki preferences]] | [[TWiki preferences]] | _TWiki preferences_ <sup>([[%TWIKIWEB%.TWikiPreferences][%TWIKIWEB%]],[[%MAINWEB%.TWikiPreferences][%MAINWEB%]])</sup> |
| Found elsewhere | <nop>TWikiContributor | TWikiContributor | <nop>TWikiContributor<sup>([[%TWIKIWEB%.TWikiContributor][%TWIKIWEB%]],[[%MAINWEB%.TWikiContributor][%MAINWEB%]])</sup> |
Internationalization
FindElsewherePlugin handles international characters (
I18N) in links, topics and webs.
Compatibility
FindElsewherePlugin Hints
- You can en- or disable this plugin for webs, topics or users, using the standard TWiki preferences hierarchy
- You can avoid single words being looked up by using
!DontLookup or <nop/>DontLookup syntax
- "Groups of webs" can use each other as lookup webs, by setting the LOOKELSEWHEREWEBS variable accordingly in their WebPreferences
FindElsewherePlugin Settings
Enabling and disabling the plugin globally
You can enable or disable the FindElsewherePlugin plugin sitewide (in
TWikiPreferences), per web (in WebPreferences) or pr. topic by defining DISABLELOOKELSEWHERE = 1.
Scope of the plugin - webs to find topics in
You can list other webs in which to look for topics that don't exist in the current web by defining LOOKELSEWHEREWEBS to be a comma-separated list of webs - for example,
TWiki,Main
Singular and plural topics
If the
WikiWord is plural but doesn't exist,
FindElsewherePlugin also looks for the singular word in other webs. You can disable this behaviour by setting DISABLEPLURALTOSINGULAR = 1. (Note this setting is for looking in
other webs only (plural to singular is still automatically done in the current web, dependent on the setting in
configure).
ACRONYM link settings
A setting called "LOOKELSEWHEREFORACRONYMS" can be set to a value of
none,
first or
all (
all is default).
none means that non-forced acronyms in topics are never found elsewhere,
first that they are linked only at the first occurence and
all that every occurence is linked. Especially topics with many occurences of the same acronym will experience improved readability by use of the
first setting.
Overriding forced local links
Even if a link refers explicitly to the current web and a topic name (for
example, [[Thatweb.ThatTopic]], you can still trigger
FindElsewherePlugin to look in other webs for that topic. To enable this behaviour for a
web, define LOOKELSEWHEREFORLOCAL = 1 in the WebPreferences. This is
particular useful when you have moved topics from one web to another, but
you don't want to rewrite all the links in the source web.
Enabled for demo and testing - try it on and off
- Set LOOKELSEWHEREFORLOCAL = 1
Plugin Installation Instructions
%$INSTALL_INSTRUCTIONS%
Plugin Info