A parametrized %WEB macro
This plugin allows to render a link to a web. While linking to a topic is quite essential to wikis,
linking to a web as an object of the wiki isn't that well supported. Most commonly a link to a web points
to the %HOMETOPIC% topic of a web which serves as the entry point for all of the web. That's
what %WEBLINK does as well. In addition it supports formatting the link in a custom way to
display a more meaningful link text than the normal WebHome text. If you optionally installed
Foswiki:Extensions/DBCachePlugin, the %WEBLINK will be displaying the TopicTitle of the target topic.
Otherwise the normal topic name will be displayed as link text.
Usage
WEBLINK
- create a link to a web
- Syntax:
%WEBLINK{web="..." name="..."}%
- Supported parameters:
Parameter: | Description: | Default: |
"web" | name of the web to link to | BASEWEB |
name="..." | name to display instead of the web name | BASEWEB (its tail in case it is a subweb) |
format="..." | format string for the web link | <a class="webLink $marker" href="$url" title="%ENCODE{"$tooltip" type="html"}%">$title</a> |
marker="..." | string to be inserted into the format string if the web link points to the current web | current |
class="..." | css class used within the web link | webLink |
The following variables can be used in the format string:
- $web: full qualified name of the web to link to
- $topic: name of the topic to link to, defaults to WebHome
- $title: title of the WebHome topic; this is either the topic name or its title
- $name: name of the web, that is the tail of the web specification with all parent webs stripped off
- $url: url for the link
- $marker: the marker set to the "marker" string if the link points to the current web
- $tooltip: tooltip for the link, mostly used in a
title
argument of an anchor
- $summary: web summary as defined in the WEBSUMMARY preference variable
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
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Info