1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-01 09:43:16 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/tv-filter-export-link Variable.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

21 lines
860 B
Plaintext

caption: tv-filter-export-link
created: 20170828095135984
modified: 20170828095757620
tags: Variables [[Core Variables]] [[Configuration Variables]]
title: tv-filter-export-link Variable
type: text/vnd.tiddlywiki
The <<.def tv-filter-export-link>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. If defined, it takes precedence over the [[tv-wikilink-template Variable]].
<<.this-is-static-link-variable>>
The variable is treated as a filter that is given the target tiddler title as input. The filter is evaluated and the first result is used as the `href` attribute.
For example:
```
\define tv-filter-export-link() [encodeuricomponent[]encodeuricomponent[]addsuffix[.html]]
```
See also the <<.vlink tv-get-export-link>> variable, which dominates over this one.