diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 9e96dc352..efc71052c 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -11,11 +11,7 @@ The `link` widget generates links to tiddlers. The content of the link widget is rendered within the `` tag. -The default value of the tooltip attribute is `<>`. If that variable is not defined then the following text is used: - -``` -<$transclude field="tooltip"><$transclude field="title"/> -``` +The default value of the tooltip attribute is `<>`. This means that you can control the text of a link tooltip in several ways: @@ -38,6 +34,17 @@ Renders as: 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 tw-wikilink-tooltip() +<$transclude field="tooltip"><$transclude field="title"/> +\end +``` + +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 * `tw-tiddlylink` - applied to all links