Template talk:Documentation subpage

Merge into Template:Documentation subpage
This template is part of the Documentation template set. The Template doc merge proposal was discussed and decided here. – Conrad T. Pino 07:15, 7 November 2007 (UTC)

New lines removed
User:PEJL reported an extra blank line at WP:SONG between "This documentation is transcluded from ..." line and the "Code" line. The extra line was caused by the combination of Documentation and Documentation subpage. User:Patrick added new lines to Documentation to deal with other issues and Documentation subpage was already emitting some itself. The prior count was low enough to not matter but 3 consecutive new lines generate in the HTML stream which I saw in test cases. I edited Documentation subpage to emit less and the extra line was elminated. My examination of the HTML looked clean after Documentation subpage ending. – Conrad T. Pino 08:11, 7 November 2007 (UTC)

Defaultsort does not work
e.g. music is sorted under "T" instead of "M". --FordPrefect42 (talk) 11:35, 10 February 2008 (UTC)

Font size
Can/should someone reduce the font size? —Markles 16:16, 14 March 2008 (UTC)
 * Why? This box is only visible when you look at the doc pages themselves, not when you look at the documentation as displayed on the template pages. And when you look at the doc pages themselves then this box is very relevant.
 * --David Göthberg (talk) 17:00, 14 March 2008 (UTC)
 * I think of it like the disclaimer at the top of tfd, below. —Markles 00:40, 15 March 2008 (UTC) &lsaquo; The template below is being considered for deletion. See templates for deletion to help reach a consensus. &rsaquo;
 * Eh? The tfd template uses that small font only because when used it is shown inside other templates. That is, it is shown in articles and pages when the template that is nominated to be deleted is used. If it used bigger font it would cause those nominated templates to grow too large on the article pages. The usage of Documentation subpage is totally different.
 * --David Göthberg (talk) 02:02, 15 March 2008 (UTC)


 * Suit yourself. It was just an idea.—Markles 05:43, 15 March 2008 (UTC)

Section 'Functions' is incorrect regarding category
Template:Documentation subpage states that this template places /doc subpages (into which it is transcluded) into category 'Documentation subpages'. In fact, this template places such subpages into one of the 'SUBJECTSPACE documentation' categories, e.g. . (A similar claim is made by .)  --AlastairIrvine (talk) 15:08, 18 March 2008 (UTC)
 * Fixed.--Patrick (talk) 16:31, 18 March 2008 (UTC)

Category revisited

 * Category:Wikipedia documentation - Even though it's currently a redlink, click on it and see the 14 current members. This is a bug in the code, or in unintended usage? Either way, could this please be fixed : ) - jc37 06:54, 23 April 2008 (UTC)


 * This is the problem:

[[Category: documentation | ]]
 * Do we really need separate categories for every even namespace? — {admin} Pathoschild 08:39:25, 23 April 2008 (UTC)
 * Does it even need categorisation at all? - jc37 15:56, 23 April 2008 (UTC)
 * Yes, it keeps pages out of Special:UncategorizedTemplates and is useful for getting a list of documentation pages for database queries. We only need one category to do that, though. — {admin} Pathoschild 20:23:04, 23 April 2008 (UTC)
 * Makes sense. Thanks for the information. At this point is it just a matter of removing the extra category code and replacing it with the single category? - jc37 08:58, 24 April 2008 (UTC)
 * Yes, if nobody objects I'll switch it back to "Documentation subpages". — {admin} Pathoschild 09:25:01, 24 April 2008 (UTC)

"user template" instead of just "user"
Currently, when this template is used from the or  space (i.e.     :Example/Template/doc), it ouputs:

This is a documentation subpage for    :Example/Template (see that page for the  itself). It contains usage information, categories and other content that is not part of the original.

It should be changed to:

This is a documentation subpage for    :Example/Template (see that page for the  itself). It contains usage information, categories and other content that is not part of the original.

Given the example (   :Example/Template/doc),     :Example/Template is not the user page. It is the user's user template page.

I have also added the ability for this template to accept two parameters allowing the user to specify what text they'd like to use instead. If neither parameters are specified, the template will automatically use "user template" and "user template page" when used on pages on the or  space. If that isn't even the case, it will continue on with the original code that was there (i.e. whatever the  is).

Just to note, this has been tested on my own personal template sandbox (User:Lightsup55/Template Sandbox) and an example /doc subpage (User:Lightsup55/Template Sandbox/doc).

So with that, please change this:

To this:

Thanks. --Lightsup55 ( T | C ) 22:59, 7 February 2009 (UTC)
 * Why not just call everything a template? And what's up with the "article" case? This template should never be used in the mainspace. --- RockMFR 05:24, 9 February 2009 (UTC)
 * The whole "article" thing wasn't my idea. It was there already, so don't look at me. But yeah... this shouldn't ever be used in the article namespace. Although I do agree with you, keep in mind that "templates" (not to be confused with pages that are just transcluded on another page, such as Wikipedia:Articles for deletion/Article name transcluded on the log page for the day when it was created) are generally found in the and  namespaces. --Lightsup55 ( T | C ) 06:33, 9 February 2009 (UTC)
 * ✅ Ruslik (talk) 12:47, 9 February 2009 (UTC)

Please add "userbox=yes" parameter
editprotected

This change is to add the " " parameter (case sensitive). I plan on using this with the  template (a shortcut that will load this template as  ).

Test pages:
 * User:Lightsup55/Template Sandbox 3
 * User:Lightsup55/Template Sandbox 3/doc

Thanks. --Lightsup55 ( T | C ) 18:47, 12 February 2009 (UTC)
 * Not done - See my explanation over at your related editprotected request at Template talk:Documentation. --David Göthberg (talk) 23:16, 12 February 2009 (UTC)
 * This change makes:
 * This is a documentation subpage for    :Example/Template (see that page for the  itself).
 * It contains usage information, categories and other content that is not part of the original.
 * Only when the " " parameter is specified (i.e. ). It is for the use on the /doc page of a userbox template.


 * The normal function (with the help of  magic words together), or   without parameters, just makes:
 * This is a documentation subpage for    :Example/Template (see that page for the  itself).
 * It contains usage information, categories and other content that is not part of the original.
 * Test pages: User:Lightsup55/Template Sandbox 3 and the /doc page
 * --Lightsup55 ( T | C ) 04:12, 13 February 2009 (UTC)
 * I've given examples, made changes based on your recommendations, inserted the new code, and re-applied the editprotected template. --Lightsup55 ( T | C ) 04:52, 13 February 2009 (UTC)
 * I see from the previous section that you and Ruslik deployed the change from "user" to "user template". And as far as I can see that "user template" code is indeed in the deployed code of this template. So I believe your second example here is wrong. It is not "userbox" vs. "template", but rather it is "userbox" vs. "user template", right?
 * --David Göthberg (talk) 07:40, 13 February 2009 (UTC)
 * "user template" is automatically given by the use  (or  ) if the template is being used from the      namespace, it takes the namespace and makes it lowercase. A user who uses this template on a page that documents the usage of a userbox might not want to say "user template". It is optional to specify the "userbox=yes" parameter. Alternatively, "text1=your words" and/or "text2=your words" can be used to have your own words displayed. Although you could manually type in "text1=userbox template" and "text2=userbox template page", it is a little much extra to type and I thought that having a shortcut to it might be preferred.
 * --Lightsup55 ( T | C ) 18:23, 13 February 2009 (UTC)
 * Assuming I have correctly understood what it is you want to do:
 * Ah, so that is what you want to do. You want to make it so when we view the /doc page of a userbox in user space you can make it so documentation subpage display the word "userbox" instead of "user template". So that's what all this is about, two words? (Couldn't you have told us that from starters? Instead of making me spend hours reading your code and asking you questions?)
 * So to make that possible you want to add code to use this: . And have a special template userbox documentation subpage, which should be put on a special preload page Template:Documentation/userbox preload. And add code to use to load that special preload page. And all this of course has to be explained in the documentation of those templates. Ouch, that is a lot of code, templates, pages and documentation to just change two words.
 * But hang on, a userbox is a "user template", so that already is a pretty good name for it. But calling it a "userbox" is of course a bit more precise. So question is if it is worth that much trouble just to have the option to sometimes change those two words...
 * Now that we know what all this is about we can start to ponder and discuss how useful it is, if it is worth the added complexity, and if there is a better or simpler way.
 * And I think I do know a better and simpler way:
 * In your previous additions to this template you added the parameters "text1" and "text2". So you can already do to achieve what you want. Or the deluxe variant . (By the way, you haven't yet added those two parameters to the documentation of the documentation template.)
 * This means you can make a very simple and user friendly userbox documentation subpage template that needs no parameters, and that in turn calls . And I think that is a much better and simpler solution than all the "userbox=yes" stuff. To use this the users only need to do one edit to their /doc page to change documentation subpage to userbox documentation subpage. This needs no change to their template pages and no change in preload etc.
 * So Lightsup55, it is your previous rather nifty additions to this template that made this simple solution possible! :))
 * So my conclusion is: I recommend we do not add "userbox=yes", since we now have a simpler and better option.
 * --David Göthberg (talk) 09:24, 13 February 2009 (UTC)
 * As per your suggestion, I'm withdrawing this request. --Lightsup55 ( T | C ) 18:33, 13 February 2009 (UTC)

Glitch at Template:*mp/doc
Hi, in the above template's usage, the "*" in the template's name is not reading as a nowiki, instead it's making a bullet, that cancels out the link back to the main template page. Please help and fix this! Thanks --Funandtrvl (talk) 18:06, 26 June 2009 (UTC)
 * I think. &mdash; Martin (MSGJ · talk) 18:37, 26 June 2009 (UTC)

Minor redirected link update
edit protected Please update this redirect: categories to: categories Thanks  --Funandtrvl (talk) 18:40, 14 July 2009 (UTC)
 * Yes check.svg Done - Rjd0060 (talk) 20:09, 14 July 2009 (UTC)

Table of contents
The Wikipedia default is that when a page has more than three sections, a table of contents (further: TOC) is displayed. A certain user told me that in documentation pages the use of a TOC is often disabled using. (That is apart from the fact that many documentation pages don't have more than three sections, so a TOC is not displayed anyays.) If this is so then perhaps we should add to this template. An editor who will want to use a TOC can always add it with. What are your opinions. Debresser (talk) 15:43, 11 October 2009 (UTC)


 * I disagree with automatically adding . Yes, there are some documentation pages that use , I myself used to use that on doc pages once upon a time. But long documentation pages need the table of contents, so nowadays I prefer to let the table of content automatically show like on any other page. And making template doc pages behave differently than what is standard would be confusing. It would be hard for a user to find out why a doc page does not show the table of content, since the  would be hidden inside this template.
 * --David Göthberg (talk) 02:05, 2 February 2010 (UTC)

When there is no documentation
Slightly ambiguous heading, but I am looking for a template to display at the top of /doc pages which are designed for categories and interwiki links rather than documentation. There are a few templates around which will transclude /doc for this purpose but do not encourage any specific documentation to be written. (Often it's a series of templates which are centrally documented.) A few spring to mind: I'm wondering if it would be preferable to adapt this template, probably by feeding a parameter, or if it would be easier to write a new template. &mdash; Martin (MSGJ · talk) 19:31, 1 February 2010 (UTC)
 * Template:Asbox
 * Template:Flag template documentation
 * Template:Category interwiki (I created this one)
 * I'm not sure we need a whole new template. Perhaps all that needs to be done is make the "usage information, " and "and other content" strings optionally disabled (i.e. so that this template reads "It contains categories and interlanguage links that are not part of the original ...".  But I like those /doc pages to display something, versus only having the   material and nothing else. — Andrwsc (talk · contribs) 19:41, 1 February 2010 (UTC)
 * Okay, I agree we can adapt this one. But the first line would need to be changed as well because "This is a documentation subpage" makes no sense if the page is not for documentation ... &mdash; Martin (MSGJ · talk) 21:11, 1 February 2010 (UTC)

Original recipe?
Is there really anything still using this deprecated style from three years ago? The comments mention it being for WP:DPP, but that just redirects to Documentation, and some of the other commentary leads me to believe it actually concerns WikiProject template sharing, which has been inactive for some time. Would anyone object to finally simply removing this? 「 ダイノ ガイ 千？！ 」? · Talk⇒Dinoguy1000 21:15, 13 August 2010 (UTC)
 * I wondered about this as well. I am imagine it could be safely removed now. &mdash; Martin (MSGJ · talk) 21:43, 13 August 2010 (UTC)

I have added a tracking category to check for any uses of Original-recipe or Orig; here's hoping it's still empty once the edit clears the job queue. 「 ダイノ ガイ 千？！ 」? · Talk⇒Dinoguy1000 22:25, 18 August 2010 (UTC)
 * The tracking category was still empty after three days (more than long enough for the job queue to have cleared), so I went ahead and removed the "original-recipe" code... Feel free to yell at me if I somehow managed to muck it up. =) 「 ダイノ ガイ 千？！ 」? · Talk⇒Dinoguy1000 23:35, 21 August 2010 (UTC)

Update interwiki
Please, update interwiki from Russian Wikipedia: ru:Шаблон:Docpage, thanks. Andrew M. Vachin (talk) 20:02, 31 October 2010 (UTC)

Redundant?
"(see that page for the template itself)" seems redundant next to a wikilink to the parent page. Please delete it. If there are objections, I'd welcome a reversion and discussion. --Bsherr (talk) 21:08, 12 November 2010 (UTC)
 * As no one has opposed this, I have made the edit. &mdash; Martin (MSGJ · talk) 09:36, 14 November 2010 (UTC)

Small error at bottom of rendered page
Down near the very bottom of this template page, I see something like this:

Meta-Wiki &#123;{Documentation}} ancestor:


 * meta:Template:Documentationen:Template:Documentation subpage

Of course, that last link, being a self link, isn't actually rendered as a link there, but is instead just bold text. Unfortunately, I'm having trouble seeing where the last link comes from...
 * Template:Documentation/see also has everything prior to that, but then ends with a.
 * Template:Documentation subpage/doc might do it.
 * And so might Template:Documentation subpage. (Or even Template:Documentation, for all I know!)

Very confusing.

&mdash;SamB (talk) 22:53, 7 June 2011 (UTC)
 * &mdash; Martin (MSGJ · talk) 12:38, 8 June 2011 (UTC)

Template adds portal doc pages to a non-existent cat
This template is used on nine pages in the portal space, which are then added to the non-existent category Portal documentation. It's not clear to me that this category is needed; therefore, can the template be changed to prevent the addition of portal doc pages to the non-existent cat? Decstop (talk) 04:06, 17 October 2011 (UTC)
 * Makes sense. I also took out "Article documentation" - because this would never be used in article space! &mdash; Martin (MSGJ · talk) 10:00, 17 October 2011 (UTC)
 * Thank you Decstop (talk) 02:44, 18 October 2011 (UTC)

While we are here I think it would be good idea to rename the categories to "Wikipedia documentation pages" and "User documentation pages". We successfully did something similar with "Template documentation pages" a while ago (see Template talk:Documentation), and this clears the other category to be of more use about finding pages related to documentation rather than the actual /doc pages. &mdash; Martin (MSGJ · talk) 10:33, 17 October 2011 (UTC)
 * I got impatient and went ahead with this. I also had a little reorganisation of the category structure for template documentation. &mdash; Martin (MSGJ · talk) 21:29, 17 October 2011 (UTC)

Edit request
Replace: [[Category: documentation pages]]

with

Purpose: to check to make sure the page that is being documented actually exists. &mdash; Train2104 (talk • contribs) 21:17, 17 December 2011 (UTC)
 * Yes check.svg Done Sensible. Anomie⚔ 04:09, 19 December 2011 (UTC)


 * That actually needed to be  rather than  , so I've fixed it. -- WOSlinker (talk) 07:54, 19 December 2011 (UTC)

interwikis to Wikidata
Please update the template indicating the interwikis are now added in Wikidata. --Vivaelcelta {discussion · &#32; contributions} 13:47, 6 March 2013 (UTC)
 * Please, propose a specific change. Ruslik_ Zero 19:02, 6 March 2013 (UTC)
 * I'm guessing that something such as Template:Documentation subpage/sandbox would do. -- WOSlinker (talk) 19:22, 6 March 2013 (UTC)

Text customization - With text1 and text2
User:Sardanaphalus and User:Codename Lisa, the 25 December 2014 diff for Template:Documentation subpage/doc leads me to believe that when I look at the first example for both text1 and text2, I should be seeing both text strings; all I see is the text2 string — both the first and second examples look the same to me. I see the same result when I look at the /doc transcluded on Template:Documentation subpage FYI, I'm using Safari 5.0.6 on Mac OS X 10.5.8. Thanks. SBaker43 (talk) 01:10, 20 January 2015 (UTC)
 * Hi.


 * That's not really the diff's fault; the code responsible for rendering those parameters is:


 * You know, assumptions backfire... sometimes.


 * Best regards,
 * Codename Lisa (talk) 01:18, 20 January 2015 (UTC)


 * If text1 and text2 are set, however, shouldn't text1 be visible somewhere – or have I confused myself..? Sardanaphalus (talk) 08:28, 20 January 2015 (UTC)
 * Well, join the club! Maybe we should ask someone who knows. But I am busy right now. My time, unfortunately, has grown scarce. Best regards, Codename Lisa (talk) 00:30, 21 January 2015 (UTC)

Category:Documentation subpages without corresponding pages
I believe Category:Documentation subpages without corresponding pages shouldn't include user pages and propose to limit it to template and module namespaces. I'll leave this here and implement it if noone objects. ‑‑Trialpears (talk) 10:56, 16 January 2020 (UTC)

Text customization (again)
Please explain the purpose and function of text1.

Currently in the documentation, text1 appears to do nothing, so the approach of letting the example explain itself is not sufficient. CapnZapp (talk) 14:44, 27 October 2020 (UTC)

One documentation page, many templates
How do I set up the documentation for a documentation page that is used by many templates?

(The documentation doesn't say)

For instance: Chess diagram small uses Template:Chess diagram/doc, but that documentation page's Documentation subpage refers to Chess diagram, not Chess diagram small!

Regards, CapnZapp (talk) 14:50, 27 October 2020 (UTC)
 * , see second line of the wikitext of the Template:Chess diagram small. It passes  as first parameter to transclusion of template Documentation:
 * This functionality of the Documentation template is documented at Template:Documentation. As for content of documentation, the template Chess diagram small is described in section "Small diagram". —⁠andrybak (talk) 15:05, 27 October 2020 (UTC)
 * I have also updated the banner at the top of Template:Chess diagram/doc: Special:Diff/985716832. I hope this helps. —⁠andrybak (talk) 15:12, 27 October 2020 (UTC)
 * I have also updated the banner at the top of Template:Chess diagram/doc: Special:Diff/985716832. I hope this helps. —⁠andrybak (talk) 15:12, 27 October 2020 (UTC)

Discussion at MediaWiki talk:Scribunto-doc-page-header
You are invited to join the discussion at MediaWiki talk:Scribunto-doc-page-header § Category:Module documentation pages. —⁠andrybak (talk) 09:27, 14 May 2024 (UTC)