Template talk:Documentation

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Module sandbox mirror link fix[edit]

Implemented a fix for the module sandbox "mirror" link. ("Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.") Previously, the preload was Template:Documentation/mirror for both templates and modules, which did not allow the module sandbox mirror link to work properly. The error I got was: Script error: Lua error at line 1: unexpected symbol near '{'. I tested this with Special:Permalink/725294632, and it looks good now. Ping if there are any issues. — Andy W. (talk ·ctb) 20:10, 14 June 2016 (UTC)

Since I just created the sandbox for Module mentioned in the permalink above, Module:Location map/data/New York would be a good place to see the mirror link in effect. — Andy W. (talk ·ctb) 20:21, 14 June 2016 (UTC)

Need a passed parameter[edit]

Moot: There's already a work-around.

Need to be able to pass a parameter, like |version= or |passed= so that documentation flexibly written for multiple similar templates can do something like {{#ifeq:{{{variant}}}|someKeyword | specialVersionOfAnInstruction | defaultVersionOfAnInstruction }}. While such customization is already possible, it presently requires creating a virtually empty /doc page for every variant template and transcluding {{basicTemplateName/doc|someKeyword}} in it, and this is inefficient. It would be better to have no /doc page for the derived templates that share the main template's documentation, and just call the documentation directly from those templates with {{Documentation|basicTemplateName|version=someKeyword}}. I'm assuming that the module can pass this parameter to the transcluded documentation as a parameter, the way the call from the near-empty /doc page does.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  10:55, 23 June 2016 (UTC)

SMcCandlish, if you explicitly pass the documentation page ({{documentation|content={{Template:Any page/doc|parameters}}}}), instead of implicitly passing it ({{documentation}} or {{documentation|Template:Any page/doc}}), you can overcome this limitation. this is covered in the documentation for this template/module. Frietjes (talk) 22:33, 23 June 2016 (UTC)
Ah! Thanks. I missed that, since it was in among a bunch of stuff about [edit] [purge] links.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  07:52, 24 June 2016 (UTC)

Link box / edit / purge not appearing with |1= and |content=[edit]

This mmterial in the documentation no longer appears to be accurate:

Note that if the /doc page exists, a link to it is still shown in the link box below the doc box.

Parameter |1= and the |content= parameter can also be combined, like this:


Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box

No link box, [edit] or [purge] seem to be appearing. E.g., there is no difference in display between this version of a template [1], using the |1= and |content= features together, and this version [2], using |content= without |1=.

Also, the template's instructions to use |content={{Template:Any page/doc |parameters}} is redundant, and can be pared down to |content={{Any page/doc |parameters}} as I did at the example template above.
 — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  08:37, 24 June 2016 (UTC)

I see a link box for both. As for {{Template:...}}, per WP:TRANS, the namespace is redundant when it is Template. I thought that this was a well-known fact - we pretty much always write {{citation needed}} and not {{Template:citation needed}}. --Redrose64 (talk) 09:46, 24 June 2016 (UTC)

Empty alt text edit request[edit]

Empties the alt attribute on the documentation icon. The adjacent text, "Template documentation" or "Module documentation", is sufficient alternative text, so a non-empty alt attribute repeats information.

Matt Fitzpatrick (talk) 06:31, 10 July 2016 (UTC)

Yes check.svg Done here and here. Please ping if there are any issues — Andy W. (talk ·ctb) 04:33, 11 July 2016 (UTC)