1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 11:29:58 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/variables/tv-wikilink-template.tid
Jermolene 06ea4060cb LinkWidget: Add support for tv-filter-export-link
This change makes it possible to perform the conversion from target
tiddler title to `href` value as a filter expression (previously a
JavaScript macro was needed to use the tv-get-export-link variable)
2017-08-28 11:06:21 +01:00

24 lines
1.1 KiB
Plaintext

caption: tv-wikilink-template
created: 20150228105954000
modified: 20170828095603911
tags: Variables [[Core Variables]] [[Configuration Variables]]
title: tv-wikilink-template Variable
type: text/vnd.tiddlywiki
The <<.def tv-wikilink-template>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. The <<.vlink tv-filter-export-link>>, if defined, it takes precedence over the <<.vlink tv-wikilink-template>> variable.
<<.this-is-static-link-variable>>
The variable is treated as if it was a [[macro|Macros]] with the following parameters:
;uri_encoded
: The title of the target tiddler of the link, but [[percent-encoded|Percent Encoding]]
;uri_doubleencoded
: The value of the <<.param uri_encoded>> parameter but percent-encoded again, i.e. with its `%` characters further converted to `%25`
> `\define tv-wikilink-template() ../tiddlers/$uri_encoded$.html`
The variable defaults to `#$uri_encoded$`.
See also the <<.vlink tv-get-export-link>> variable, which dominates over this one.