diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 1a3e636a1f..ec0ee3ed0a 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -36,39 +36,30 @@ The default value of the tooltip attribute is supplied by the <<.vlink tv-wikili This means that you can control the text of a link tooltip in several ways: -``` -<$link to="HelloThere" tooltip="Custom tooltip">Link 1 +<Link 1""">> -<$link to="HelloThere" tooltip="Another tooltip">{{$:/core/icon}} +<{{$:/core/icon}}""">> -<$set name="tv-wikilink-tooltip" value="I'm a link to {{!!title}}"> +< <$link to="HelloThere">Link 2 - - -``` - -Renders as: - -<$link to="HelloThere" tooltip="Custom tooltip">Link 1 - -<$link to="HelloThere" tooltip="Another tooltip">{{$:/core/icon}} - -<$set name="tv-wikilink-tooltip" value="I'm a link to {{!!title}}"> -<$link to="HelloThere">Link 2 - +""">> Note that the tooltip is rendered with the current tiddler set to the target of the link. A useful convention is to set the tooltip like this: -``` -\define tv-wikilink-tooltip() -<$transclude field="tooltip"><$transclude field="title"/> +<<$transclude $field="tooltip"><$transclude $field="title"/> \end -``` + +<$link to="SampleTabThree">Link 3 has a ''tooltip'' field, so the tooltip is its content. + +<$link to="HelloThere">Link 4 has none, so the title is used instead.""">> 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. +Setting <<.vlink tv-wikilinks>> to `no` keeps the tooltip from generating links of its own. + ! Action Variables <<.from-version "5.4.0">> The <<.var actionTiddler>> variable is available to <<.param startaction>> and <<.param endaction>>.