Template talk:TagValue
Great template - there's a real need for this! Part of me thinks it might be better to add an option to hide the key on the main Tag template (something like {{Tag|wheelchair|yes|displayKey=no}}, but that'd probably end up longer and more complex to type... Frankie Roberto 22:35, 6 September 2009 (UTC)
Link with redirect=no
Is there a way to add redirect=no
to the generated link? I tried following the docs by using on_kerb
but that does not work. My goal is: We have a list of values on https://wiki.openstreetmap.org/wiki/Key:parking#Common_values and I want to change the links for those tag-pages that are redirected back in a way, that forces them to stay on the redirected page. I think that is less confusing for users. --Tordans (talk) 06:45, 28 December 2022 (UTC)
Lua rewrite
I've rewritten this template to be based on Module:Tag instead of wikitext. In general, there should be no difference to the input or output, other than a minor invisible change to the rendered HTML syntax, but some aspects of performance should improve under the new implementation. The difference should be significant on pages that transclude this template many times. The following comparisons reflect both the change proposed here and the one proposed in Template talk:Tag#Lua rewrite, but they remain somewhat pessimistic because of other templates like {{TagKey}} that haven't been ported to Lua yet:
− | NewPP limit report
Cached time: | + | NewPP limit report
Cached time: 20240414164807
Cache expiry: 86400
Reduced expiry: false
Complications: [show‐toc]
CPU time usage: 1.123 seconds
Real time usage: 2.899 seconds
Preprocessor visited node count: 8111/1000000
Post‐expand include size: 121672/2097152 bytes
Template argument size: 5528/2097152 bytes
Highest expansion depth: 23/100
Expensive parser function count: 10/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 7926/5000000 bytes
Lua time usage: 1.750/15 seconds
Lua virtual size: 7655424/52428800 bytes
Lua estimated memory usage: 0 bytes
Number of Wikibase entities loaded: 0/250
Transclusion expansion time report (%,ms,calls,template)
100.00% 2497.836 1 -total
70.01% 1748.793 283 Template:Tag/sandbox
8.22% 205.206 76 Template:Langcode
7.13% 178.169 27 Template:TagValue/sandbox
6.41% 160.193 1 Template:Feature
5.66% 141.298 43 Template:TagPagename
5.14% 128.297 35 Template:TagKey
4.97% 124.103 1 Template:Infobox_small
3.19% 79.673 1 Template:Languages
2.78% 69.374 7 Template:LangSwitch |
− | NewPP limit report
Cached time: | + | NewPP limit report
Cached time: 20240414164537
Cache expiry: 86400
Reduced expiry: false
Complications: [show‐toc]
CPU time usage: 1.052 seconds
Real time usage: 2.056 seconds
Preprocessor visited node count: 17010/1000000
Post‐expand include size: 120773/2097152 bytes
Template argument size: 19596/2097152 bytes
Highest expansion depth: 22/100
Expensive parser function count: 39/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 963/5000000 bytes
Lua time usage: 0.940/15 seconds
Lua virtual size: 7258112/52428800 bytes
Lua estimated memory usage: 0 bytes
Number of Wikibase entities loaded: 0/250
Transclusion expansion time report (%,ms,calls,template)
100.00% 1723.883 1 -total
30.65% 528.360 78 Template:Tag/sandbox
29.35% 506.024 1 Template:Aerialway_attributes
29.16% 502.696 45 Template:TagKey/link
28.42% 489.953 164 Template:Langcode
26.58% 458.238 135 Template:LangPrefix
24.43% 421.182 60 Template:LL/exists/default
18.22% 314.144 25 Template:LL
17.21% 296.606 30 Template:TagKey/exists
15.98% 275.463 30 Template:LL/exists |
− | NewPP limit report
Cached time: | + | NewPP limit report
Cached time: 20240414163215
Cache expiry: 86400
Reduced expiry: false
Complications: [show‐toc]
CPU time usage: 1.682 seconds
Real time usage: 3.653 seconds
Preprocessor visited node count: 33665/1000000
Post‐expand include size: 295474/2097152 bytes
Template argument size: 24083/2097152 bytes
Highest expansion depth: 24/100
Expensive parser function count: 11/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 3074/5000000 bytes
Lua time usage: 1.900/15 seconds
Lua virtual size: 8929280/52428800 bytes
Lua estimated memory usage: 0 bytes
Number of Wikibase entities loaded: 2/250
Transclusion expansion time report (%,ms,calls,template)
100.00% 3268.615 1 -total
32.94% 1076.670 312 Template:Langcode
32.27% 1054.723 1 Template:KeyDescription
25.98% 849.328 9 Template:PossibleSynonym2
23.53% 769.147 61 Template:LangSwitch
19.42% 634.892 86 Template:Tag/sandbox
17.42% 569.549 113 Template:Key
16.87% 551.401 134 Template:TagPagename
14.35% 468.996 43 Template:LangSwitch/langcode
11.54% 377.086 1 Template:DescriptionLinks |
The Lua module is passing a battery of tests, but more test cases are always welcome. If no showstopping issues are identified, I'd like to deploy these two rewrites soon so we can move on to other templates like {{TagKey}}.
– Minh Nguyễn 💬 16:50, 14 April 2024 (UTC)
And also a port of {{TagKey}}, completing the set. – Minh Nguyễn 💬 18:40, 25 April 2024 (UTC)
Resolved: I've deployed the changes. – Minh Nguyễn 💬 07:09, 7 May 2024 (UTC)