Template talk:Lw

Latest comment: 12 years ago by Sidelight12

I found a good compromise for this template:

{{lw|Unknown|}} should show "Unknown"
{{lw|Unknown}} should show "w:Unknown"
{{lw|Colloquium}} points to wikiversity:Colloquium, as "Colloquium"

Sidelight12 Talk 02:24, 14 December 2012 (UTC)Reply

I agree. Default behavior would be to show the w:, add a second parameter to hide the w:. I haven't experimented with empty parameters yet. I'm not sure if there's a way to tell the difference between a missing parameter and an empty one. It might need to be something like {{lw|Unknown|-}}. The - could be any character, but documenting it as a minus makes it clear that it is subtracting the w:. Let me know if you need help with the coding. -- Dave Braunschweig (talk) 04:03, 14 December 2012 (UTC)Reply
  • For other types of links it works. [[w:Colliquium|]] shows up as Colliquium. I finally learned the whole word doesn't have to be retyped, which I was trying to get around. This template and using the | after links solves the problems very well. I could try. Sidelight12 Talk 13:07, 14 December 2012 (UTC)Reply

Colloquium Colloquium|

Sidelight12 Talk 16:18, 14 December 2012 (UTC)Reply

Now adjusted to support either a single parameter or a two parameter format. The single parameter format displays the leading w:. The two parameter format does not display the leading w:. Content for the second parameter is ignored. It is only checked for existence. Enjoy! -- Dave Braunschweig (talk) 01:09, 15 December 2012 (UTC)Reply
That's perfect. Sidelight12 Talk 11:29, 16 December 2012 (UTC)Reply
Return to "Lw" page.