Open main menu

Wikimedia Commons β

Template talk:Documentation

Section headingsEdit

This template breaks section headings. See [1]. -- Bryan (talk to me) 15:18, 23 February 2008 (UTC)

Color changeEdit

I propose to add " clear: both; border: 2px dotted #666666; padding: 0.6em; background-color: #f5f5f5;" to the style tag of the first div. That would make the documentation template be easier to distuingish from the actual content of the containing template. That's standard on all Wikipedias using Template:Documentation. --Slomox (talk) 21:14, 17 January 2009 (UTC)

Ah, I'll just do it, it's clearly an improvement. --Slomox (talk) 00:31, 18 January 2009 (UTC)

Some updatesEdit

It would be nice if this version of the template could take over some of the features of the English wikipedia version. Especially the sandbox and testcases detection is highly useful for editors. Although perhaps it should be at the bottom of the template, and not at the top. I also think we should remove the "view" option, like they have done on en.wp. It's not really useful. A selflink indentation on "This documentation is transcluded" part might be useful as well. TheDJ (talk) 21:31, 14 September 2009 (UTC)

{{#switch: {{SUBPAGENAME}}
    {{#switch: {{SUBJECTSPACE}}
      {{#ifexist: {{FULLPAGENAME}}/sandbox
       |This template has a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> <!--
        -->{{#ifexist: {{FULLPAGENAME}}/testcases
         |and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>}} for editors to experiment.
       |{{#ifexist: {{FULLPAGENAME}}/testcases
        |This template has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> for editors to experiment.}}

This is the code for sandbox/testcases detection. TheDJ (talk) 11:27, 15 September 2009 (UTC)

Format when creating a subpage without templateEdit

As I had some troubles with the template for /doc subpages, I wrote a description an just inserted standard section header(s). Currently one needs to insert a blank line before the first section header, otherwise the header appears unformatted, e.g. as == Usage ==. -- User:Docu at 17:15, 21 April 2010 (UTC)

I fixed it. --Slomox (talk) 17:37, 21 April 2010 (UTC)
Thanks. For some reason, I didn't consider trying it myself. -- User:Docu at 19:33, 21 April 2010 (UTC)


Hi. I looked for ways that this template is translated so it must be auto-translated {{{Autotranslate|1={{{1|}}}|2={{{2|}}}|base=documentation}}. Can anyone say if you can? Thanks--Diego Sanguinetti (talk) 17:59, 16 July 2010 (UTC)

Excusme is:

--Diego Sanguinetti (talk) 17:34, 17 July 2010 (UTC) {{Editprotected}} There are a lot of translations on the subpages but they are not used. Either unprotect this template for autoconfirmed users or invent a solution. -- RE rillke questions? 14:34, 21 July 2011 (UTC)

   Done , template is now autotranslated. Regards, -- ChrisiPK (Talk|Contribs) 14:44, 25 July 2011 (UTC)
Thank you :) -- RE rillke questions? 17:04, 25 July 2011 (UTC)


Now, we have a problem (template-loop) in the example section. -- RE rillke questions? 18:09, 31 July 2011 (UTC)
Don't know what the problem is. I partially expanded the examples to avoid a loop on the above page. If you have a solution, please post it. – Adrignola talk 19:19, 26 August 2011 (UTC)
So one case is fixed but there are many other. Really complicated ... -- RE rillke questions? 19:52, 26 August 2011 (UTC)
  This section is resolved and can be archived. If you disagree, replace this template with your comment. RE rillke questions? 21:00, 14 November 2011 (UTC)

template sandboxEdit

I would like to propose that if this page is transcluded on page with "sandbox" {{SUBPAGENAME}} than only Category:Sandbox templates is added. --Jarekt (talk) 15:05, 2 August 2011 (UTC)

Template loop problem solutionEdit

{{editprotect}} Hi there. For or {{Recent}}, {{MIT}} and some other templates, I've got the same template loop problem as User:Rillke got in {{PermissionOTRS}} (see #Edition). The problem is: If a template contains a documentation through the template {{Documentation}}, and the documentation transcluded other templates localized through {{Autotranslate}}, there will be the warning due to the loop of {{Autotranslate}}, because {{Documentation}} is also localized through {{Autotranslate}}. To solve the problem, we may use the method of {{Autotranslate}}, but not the {{Autotranslate}} template directly. So, plz change the whole page source of Template:Documentation to:

[[Category:Autotranslated templates|Documentation]]

I've tested in my sandboxs User:Tomchen1989/sandbox and User:Tomchen1989/sandbox1, it works just fine. --Tomchen1989 (talk) 15:32, 21 September 2011 (UTC)

   Done --Jarekt (talk) 15:54, 21 September 2011 (UTC)

purge buttonEdit

Somemone could add a purge button {{purge}} like in en:Template:Documentation ? --Pixeltoo (talk) 17:26, 14 November 2011 (UTC)


In Template:Documentation/layout there seem to be some mechanism to call Template:Documentation/preload. I do not think it is working, or I do not know how to get it to work. Anybody familiar with it? --Jarekt (talk) 15:32, 14 December 2011 (UTC)

Just look at Template:Use VisualFileChange and click on an "edit"-link generated by this template. -- RE rillke questions? 15:50, 14 December 2011 (UTC)
Thanks, I never noticed "edit" so I always clicked the red link and was annoyed by the lack of preload. I guess for other clueless people like me, I modified Template:Editnotices/Namespace/Template to add a link above the edit box to allow preload with Template:TemplateBox/preload. I will merge 2 preload pages. --Jarekt (talk) 16:04, 14 December 2011 (UTC)

Import for en.wikipediaEdit

What was the rationale for doing so? If I am not mistaken, we lost internationalisation in the process. Jean-Fred (talk) 17:01, 24 July 2012 (UTC)

It was overwritten when I imported {{Infobox user}}. I have deleted the version created by me. Thanks for bring this up. --Sreejith K (talk) 20:18, 24 July 2012 (UTC)
You deleted the history-entry that you imported the template from wp but not the version you imported. -- Rillke(q?) 20:48, 24 July 2012 (UTC)
My bad. Apologies. --Sreejith K (talk) 22:18, 24 July 2012 (UTC)
Ok, thanks! Jean-Fred (talk) 08:36, 25 July 2012 (UTC)


{{edit protected}} en:Template:Documentation has a "content" parameter allowing the documentation to, "be fed directly as text."

<!--Last line of your template code--><noinclude>
 | content =
(some documentation)

This would be convenient on Commons. For example, Template:Columns. Hyacinth (talk) 22:56, 11 August 2014 (UTC)

   Support This is needed to get some template docs work. Please add it. --Rezonansowy (talk) 16:36, 14 February 2015 (UTC)
What exactly does not work with the template as of now? And it would be kind if you could post a sample of what you expect that I or the admin fulfilling this request can history merge or copy&paste with this or into this template. -- Rillke(q?) 16:41, 14 February 2015 (UTC)
@Rillke: Hi, the template version on Commons lacks the {{{content}}} parameter which is used to embed doc context on template page (same page for transluction). I suggest to sync it with the last revision before the transition to Lua. It contains this parameter and some others, which are helpful in many tasks. The appearance of this template should be same or at least similar on every Wikimedia wiki, I think. There're some good sample on doc – en:Template:Documentation#Usage. --Rezonansowy (talk) 21:51, 14 February 2015 (UTC)
@Rezonansowy: Neglecting the fact that on Commons, there is a translation system, it would be possibly look similar. What I'd like to know is what the Content parameter would be useful for. I understood what it does but on Commons, you can expect a lot of edits to template documentation as it has to be translated. So a separate page is favourable in most circumstances. However, if you convince me that this assumption is too narrow, no problem, then I'll see what I can do (including amending zillions of subpages for keeping i18n support). -- Rillke(q?) 22:06, 14 February 2015 (UTC)
@Rillke: OK, I'll show where I want to use it. I'd like to use {{Source template doc}} to got same apperance like on {{Wellcome Images}}. There's one doc template for all Source templates, but the present implementation of {{Documentation}} (our template) lacks the needed parameter and prevents me to to this well. With {{{content}}} it would be possible to create a documentation with a full translation with parameters template inside. That's why this parameter is needed. Basically, I need the ability to wrap custom text into the {{Documentation}} on the same page. And this feature is present already on Example:
<!--Last line of your template code--><noinclude>
 | content =
{{Source template doc|desc=Images bearing this tag are placed in the category [[:Category:Images from Animalandia|Images from Animalandia]].
Most images from Animalandia are published under {{tl|GPL-3}}, but some are published under a Creative Commons License including the non-free {{tl|cc-by-nc-sa}}, which is not suitable for commons. See [ Aviso legal].}}}}
--Rezonansowy (talk) 12:32, 16 February 2015 (UTC)
Mhm, sorry I still don't get the point why one can't place what is intended to pass to the content= parameter on the documentation subpage (Template:Lorumipsumdolor/doc, e.g. replacing Template:Wellcome Images/doc's content with {{Source template doc|desc=This tag places images in the category [[:Category:Files from Wellcome Images|Files from Wellcome Images]].}}) instead. -- Rillke(q?) 13:19, 16 February 2015 (UTC)
That's because we don;t want to create a /doc subpage for every template. --Rezonansowy (talk) 19:53, 16 February 2015 (UTC)
What kind of advantage to you expect by managing the template and its documentation in one page? -- Rillke(q?) 20:24, 16 February 2015 (UTC)
Less mess. I think it is time to make this parameter live on Commons. --Rezonansowy (talk) 23:33, 16 February 2015 (UTC)
If you find someone. I am not convinced. Less mess presumably means "easier to copy & paste". -- Rillke(q?) 23:49, 16 February 2015 (UTC)

Rezonansowy, it sounds like you are trying to create page similar to Template:GeoName/doc where one documentation template is used for over 1000 templates (without /doc subpage), or Template:Creator/documentation (used for 19k creator templates). I am still a little shaky on the purpose of "Content" as defined on English wikipedia, but from what I gathered you want to use it in order to pass a parameter or parameters to {{Source template doc}}, so the content of the documentation is created by {{Source template doc|1=...|2=...}} template. I can see that being useful. Documentation templates Template:GeoName/doc and Template:Creator/documentation only required template name which was provided by {{PAGENAME}}, but other documentation templates might require more parameters. --Jarekt (talk) 04:31, 17 February 2015 (UTC)

Yes! That's exactly what I mean. --Rezonansowy (talk) 18:06, 17 February 2015 (UTC)
@Rillke:? --Rezonansowy (talk) 15:48, 19 February 2015 (UTC)
As previously said, not convinced and I won't spend my time with facilitating another approach of template documentation. Jarekt is admin, too. -- Rillke(q?) 08:48, 21 February 2015 (UTC)
@Jarekt: Pomożesz?   I can help with documentation. --Rezonansowy (talk) 09:27, 21 February 2015 (UTC)
   Done the template, but still need to do documentation. --Jarekt (talk) 16:08, 21 February 2015 (UTC)
Also done with documentation update. --Jarekt (talk) 13:57, 26 February 2015 (UTC)
It's no nonsense, if it allows to display inline documentation with the look and feel of a /doc subpage. On m:Template:Documentation/doc there was still an esoteric Caveat about one additional transclusion (of the /doc subpage) that could be one transclusion too much. But I've never seen that outside of Patrick's hardcore tests, therefore I removed the Caveat on Meta. Meta is still at the last state without content=, maybe add it there, too, if it is useful for any copy+paste or import/export transwiki. –Be..anyone (talk) 01:05, 23 April 2015 (UTC)


Is "purge" really not translated anywhere, or is it a problem on my side (I tested de es fr), or a problem on Meta with system messages only available here? I copied some languages as is today (de es fr pl pt ru), but stopped it, because it would be pointless if all languages (notably with other scripts, el ja ru uk zh etc.) will get updated translations "soon" here. –Be..anyone (talk) 01:05, 23 April 2015 (UTC)

Return to "Documentation" page.