Easily switch between different documented versions

Compatible with DokuWiki
Similar to translation
This plugin is somewhat similar to the translation plugin as it allows to easily jump between page with the same name in different namespaces. As the name suggests it is meant to jump between different named versions of documentation. This is especially useful when documenting software.
The idea is that for new software releases you will copy the old documentation to a new namespace so that users of old releases can still refer to previous versions of the documentation.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Recent updates:
The plugin exposes a single configuration option in the config manager. In it you configure the namespaces that contain version namespaces, with one per line.
A simple setup could look like this:
products:pixelfusion
With this setup a page named products:pixelfusion:7.1:processor
would show the pages products:pixelfusion:7.0:processor
and products:pixelfusion:6.0:processor
as other versions of the same feature.
If you have a more complex setup, you can use a regular expression to match sub namespaces as a second parameter (separated by whitespace). Eg:
products:pixelfusion products:quantumcanvas (latest_release|wip|archive:[^:]+)
This would consider products:quantumcanvas:latest_release:painter
, products:quantumcanvas:wip:painter
and products:quantumcanvas:archive:2022:painter
as versions of the same feature, but would ignore products:quantumcanvas:unrelated:painter
.
Once installed, the plugin can easily be added to a sidebar using the following syntax:
~~VERSIONSWITCH~~
The version selector will only be shown on pages that are within namespaces as per configured above.
The shown versions will take their name from the respective namespaces' start page title if any. ACLs are always honored when showing versions - non readable versions will not be shown.
Alternatively to the syntax, template authors can include the functionality directly into their template:
$vswitch = plugin_load('syntax', 'versionswitch'); if ($vswitch) { echo $vswitch->versionSelector() }