This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Template talk:Tl

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Multiple parameter version

Talk status
This discussion is still ongoing.

I have created a sandbox version of this template which simplifies illustrating a template call with one or more parameters, including named parameters:

  • {{tl/sandbox|unsigned|username}} → {{unsigned
  • {{tl/sandbox|unsigned|username{{!!}}date}} → {{unsigned
  • {{tl/sandbox|unsigned|username{{!!}}date{{!!}}unsigned{{=}}undated}} → {{unsigned

You can see how these examples (which use the new template {{!!}}) could be done with the current version of the template by looking at the third "Correct" usage example. That method also works with the new (sandbox) version, but the new one also allows the three examples above whereas the current version would fail on these (as you can see in the "Incorrect" usage examples marked "not supported yet").

The new template works the same as the old in every other case.

BTW, I've elected to link the entire template call instead of just the template name in case this is used with a very narrow name, like "I" — but there is a third way I can think of, as shown below:

  1. {{Ilink whole thing
  2. {{I|foo|bar}} ← link just template name
  3. {{Ifoo|bar}} ← link from opening braces through first pipe

I don't like the "unblanaced" look of #3. #2 produces a link that is too hard to click on. #1 is what I've gone with.

Comments? Any objections to replacing the current version with the new one? (This will need to be done by an admin since this template is edit-protected because it is currently in use on the Main Page which is edit-protected.) - dcljr (talk) 10:44, 11 February 2017 (UTC)