Template:Da smw/doc: Difference between revisions
m (Bot: Adding <noinclude>{{PAGENAME}}</noinclude>) |
No edit summary |
||
Line 1: | Line 1: | ||
{{tlx|dau}} is a specialised version of {{tl|da}} | {{tlx|dau}} is a specialised version of {{tl|da}} which makes it possible to strip the [[dab term]] from [[T:SMW|SMW]] tables. In these tables, the normal procedure of using {{tl|da}} — which works in other types of SMW output, such as the bulleted list (ul) — fails spectacularly, because SMW itself is creating an unusual kind of link. The standard linked output looks like this: | ||
<pre>[[The Eleventh Hour (TV story)|The Eleventh Hour (TV story)]]</pre> | <pre>[[The Eleventh Hour (TV story)|The Eleventh Hour (TV story)]]</pre> | ||
For whatever reason, the SMW coders create links in this very redundant way, which means the only solution is to get rid of the ''second'' [[dab term]] only. | For whatever reason, the SMW coders create links in this very redundant way, which means the only solution is to get rid of the ''second'' [[dab term]] only. |
Revision as of 23:57, 1 February 2013
{{dau}} is a specialised version of {{da}} which makes it possible to strip the dab term from SMW tables. In these tables, the normal procedure of using {{da}} — which works in other types of SMW output, such as the bulleted list (ul) — fails spectacularly, because SMW itself is creating an unusual kind of link. The standard linked output looks like this:
[[The Eleventh Hour (TV story)|The Eleventh Hour (TV story)]]
For whatever reason, the SMW coders create links in this very redundant way, which means the only solution is to get rid of the second dab term only.
The only recourse is the use of the #sub parser function, with which you can take off a negative number of letters at the end of the string, resulting in
[[The Eleventh Hour (TV story)|The Eleventh Hour
Add a closing pair of brackets — ]] — and your golden!
This is a very different principle, however, to the one on which {{da}} works.