diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index c342ec790..e75cecd77 100644 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -28,6 +28,11 @@ LinkWidget.prototype.generate = function() { // Get the parameters from the attributes this.to = this.renderer.getAttribute("to"); this.hover = this.renderer.getAttribute("hover"); + this.qualifyHoverTitles = this.renderer.getAttribute("qualifyHoverTitles"); + // Qualify the hover tiddler title if needed + if(this.qualifyHoverTitles) { + this.hover = this.hover + "-" + this.renderer.getContextScopeId(); + } // Determine the default link characteristics this.isExternal = isLinkExternal(this.to); if(!this.isExternal) { diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index e01aaf3e6..bda63a5f5 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -7,6 +7,7 @@ The `link` widget generates links to tiddlers and external URIs. Optionally, hov * `to` - link target can be a URL * `hover` - the title of a tiddler containing the popup state to set when hovering over the link +* `qualifyHoverTitles` - if this attribute is present then the title of the hover state tiddler is qualified as described in the PopupMechanism The `to` attribute is interpreted as an external link if it matches this regular expression: