Foswiki on GitHub is open for business! Next release meeting: Monday Nov. 17, 1300Z

WebLinkPlugin

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

Author(s): Michael Daum
Copyright: © 2010-2011 Michael Daum http://michaeldaumconsulting.com
License: GPL (Gnu General Public License)
Release: 1.10
Version: 12661 (2011-09-30)
Change History:  
30 Sep 2011 made dependency to Foswiki:Extensions/DBCachePlugin optional
29 Nov 2010 externalized from NatSkinPlugin
Dependencies:
NameVersionDescription
Foswiki::Plugins::DBCachePlugin>=3.70Optional
Home page: Foswiki:Extensions/WebLinkPlugin
Support: Foswiki:Support/WebLinkPlugin
I Attachment Action Size Date Who Comment
WebLinkPlugin.md5md5 WebLinkPlugin.md5 manage 0.2 K 30 Sep 2011 - 13:01 MichaelDaum  
WebLinkPlugin.sha1sha1 WebLinkPlugin.sha1 manage 0.2 K 30 Sep 2011 - 13:01 MichaelDaum  
WebLinkPlugin.tgztgz WebLinkPlugin.tgz manage 5.2 K 30 Sep 2011 - 13:01 MichaelDaum  
WebLinkPlugin.zipzip WebLinkPlugin.zip manage 8.0 K 30 Sep 2011 - 13:01 MichaelDaum  
WebLinkPlugin_installerEXT WebLinkPlugin_installer manage 4.2 K 30 Sep 2011 - 13:01 MichaelDaum  
Edit | Attach | Print version | History: r6 | r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r1 - 30 Sep 2011, MichaelDaum
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License