From 27e6c7bb8df859030031f1bd08d5e9707b0a9ade Mon Sep 17 00:00:00 2001 From: Astrid Elocson Date: Sat, 28 Feb 2015 14:45:22 +0000 Subject: [PATCH] Add links to tv-* variables in LinkWidget.tid --- .../tw5.com/tiddlers/widgets/LinkWidget.tid | 41 ++++--------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 13f12c205..69fc6cdc7 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -1,6 +1,6 @@ title: LinkWidget created: 201310241419 -modified: 201502231037 +modified: 20150228144334000 tags: Widgets caption: link @@ -18,7 +18,7 @@ The `link` widget generates links to tiddlers. (Use the HTML `` element to ge The content of the link widget is rendered within the `` tag. -The default value of the tooltip attribute is `<>`. +The default value of the tooltip attribute is supplied by the <<.vlink tv-wikilink-tooltip>> variable. This means that you can control the text of a link tooltip in several ways: @@ -51,7 +51,6 @@ A useful convention is to set the tooltip like this: This causes the tooltip to be the ''tooltip'' field of the target tiddler. If the field isn't present, then the title is used instead. - ! CSS Classes * `tc-tiddlylink` - applied to all links @@ -60,35 +59,9 @@ This causes the tooltip to be the ''tooltip'' field of the target tiddler. If th * `tc-tiddlylink-missing` - applied to tiddler links where the target tiddler doesn't exist * `tc-tiddlylink-resolves` - applied to tiddler links when the target tiddler does exist -! Configuration macros +! Configuration variables -Configuration macros can be used to modify the behaviour of the link widget. - -!! tv-wikilinks - -Links are suppressed if the macro `tv-wikilinks` evaluates to the string `no`. For example: - -``` -\define tv-wikilinks() no -``` - -!! tv-wikilink-template - -The target of the link widget defaults to the URL encoded title of the tiddler. The `href` can be templated by defining the configuration macro `tv-wikilink-template`, and including within it the token `$uri_encoded$`. For example: - -``` -\define tv-wikilink-template() http://tiddlywiki.com/#$uri_encoded$ -``` - -The token `$uri_doubleencoded$` is replaced by the double encoded title of the tiddler. - -Note that in the browser the `` element generated by the link widget has a JavaScript event handler that navigates directly to the target tiddler, ignoring the `href` attribute. - -!! tv-wikilink-tooltip - -Provides default text for the link tooltip: - -``` -\define tv-wikilink-tooltip() This is a link to {{!!title}} -<$link to="HelloThere"/> -``` +* <<.vlink tv-wikilinks>> +* <<.vlink tv-wikilink-template>> +* <<.vlink tv-wikilink-tooltip>> +* <<.vlink tv-get-export-link>>