Template talk:documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Division[edit]

If more of a division is required between what is shown by the template and the transcluded documentation we could encapsulate the transcluded content in a colored box with a header a la w:Template:Documentation. --Bequw τ 19:33, 24 April 2010 (UTC)[reply]

I'd strongly rather not... Conrad.Irwin 22:04, 25 April 2010 (UTC)[reply]

Other page[edit]

Is there a way to make sure that interwikis and categories only get included on the right page when sharing documentation using {{{1}}}? Otherwise I'd suggest that using "{{{1}}}" says "see {{{1}}} for documentation" and interwikis and categories can be on the page. Conrad.Irwin 22:04, 25 April 2010 (UTC)[reply]

We could have labelled section transclusion, but I'm not convinced that adding more complexity is a good thing. You're suggest seem just fine. --Bequw τ 22:33, 25 April 2010 (UTC)[reply]

noinclude vs. onlyinclude[edit]

Rather than using <noinclude> and having to worry about excess whitespace and such, I usually just wrap the transclusible contents in <onlyinclude>. But I see that this page gives the former as the "Best practice". Is there a reason for that? Should I change my ways? —RuakhTALK 22:52, 25 April 2010 (UTC)[reply]

I like it when templates show what they do on their own page. When navigating to a new template it allows one to understand the template better w/o having to look at the code. It also makes editing easier as one can see the output in the preview window. Our templates are currently quite split on this issue. What do others think? --Bequw τ 02:09, 26 April 2010 (UTC)[reply]
You're confusing <onlyinclude> with <includeonly>. "foo<onlyinclude>bar</onlyinclude>baz" is equivalent to "<noinclude>foo</noinclude>bar<noinclude>baz</noinclude>": it results in "foobarbaz" on the template page, and "bar" on pages that transclude the template. See m:Help:Template#Noinclude, includeonly, and onlyinclude.—RuakhTALK 15:04, 26 April 2010 (UTC)[reply]
Of course, these are named badly. The older includeonly should have been named onlyinclude, since it instructs the processor to only include (and not display locally) what follows. Onlyinclude should have been named includeonly, since it instructs the processor to include only what follows (and nothing else), but of course that was taken already. I always remember which is which by remembering that they're both misnamed.​—msh210 16:35, 26 April 2010 (UTC)[reply]
Yeah, the names are terrible. I suppose they make a bit of sense if you take include to be a noun meaning "included stuff", in which case "noinclude" means "this isn't include", "includeonly" means "this is include only", and "onlyinclude" means "this is the only include"; but that's hardly self-documenting. —RuakhTALK 17:07, 26 April 2010 (UTC)[reply]
Thanks for correcting my confusing. I don't have a good reason for the choice. --Bequw τ 21:54, 26 April 2010 (UTC)[reply]

Comment[edit]

I think this is quite a good idea, it's what we've been using on fr: for years. Simple enough question, do we have to keep adding this manually to all templates? Mglovesfun (talk) 12:57, 26 April 2010 (UTC)[reply]

Always include doc-page, even when doesn't exist.[edit]

Given the MediaWiki bugs surrounding the {{#ifexist:Template:...|{{...}}}} construct when Template:... gets created, and given editor's strong tendency to create the doc-page only after editing the template to include {{documentation}}, I think we should modify this template to always include the doc-page, even when it doesn't exist. We can use CSS to hide the resulting redlink. —RuakhTALK 16:00, 16 July 2012 (UTC)[reply]

Subverting tabs: Why?[edit]

What is the point of alterations of the last few days? To confuse folks? This really should be undone and then discussed if it really to be inplemented. DCDuring TALK 19:33, 21 March 2013 (UTC)[reply]

Um... it has been? —CodeCat 19:39, 21 March 2013 (UTC)[reply]

editprotected?[edit]

Making "move" a link could be handy:

[{{fullurl:Special:Movepage|wpOldTitle={{urlencode:Template:{{PAGENAME}}/doc}}&wpNewTitle={{urlencode:Template:{{PAGENAME}}/documentation}}&wpReason=Moving+documentation&wpLeaveRedirect=}} move]

Keφr (talk) 07:55, 23 April 2013 (UTC)[reply]

That works, thank you! —CodeCat 11:44, 23 April 2013 (UTC)[reply]

RFM discussion: March 2013–January 2014[edit]

The following discussion has been moved from Wiktionary:Requests for moves, mergers and splits.

This discussion is no longer live and is left here as an archive. Please do not modify this conversation, but feel free to discuss its conclusions.


Documentation subpages to /documentation[edit]

The current name, /doc, conflicts with the language code {{doc}}, which was deleted (it wasn't in use) because of this conflict. But to really solve this, we need to move the documentation subpages to a name that won't conflict with anything. —CodeCat 14:48, 2 March 2013 (UTC)[reply]

As suggested in the Grease Pit, the subpages should really be moved to /documentation, to avoid conflict with script codes (which are four letters long). - -sche (discuss) 16:03, 2 March 2013 (UTC)[reply]
That could work too, but script codes begin with capital letters so there shouldn't be any conflict. —CodeCat 16:24, 2 March 2013 (UTC)[reply]
Maybe not in the software, but probably in people's minds. If we wanted to abbreviate some word or other as "cyrl", and some page or template or something had one subpage called "/cyrl" for that word, and another called "/Cyrl" to indicate the Cyrillic alphabet, I for one would find it confusing and would probably be constantly mixing them up. —Angr 20:11, 3 March 2013 (UTC)[reply]
Ok, then "documentation" is fine. —CodeCat 20:20, 3 March 2013 (UTC)[reply]
Fine by me, I don't type the names in anyway, to get to {{fr-noun/doc}} I would first go to fr-noun then click on the documentation link, to adding an extra 10 characters wouldn't affect the way I browse. Mglovesfun (talk) 11:11, 5 March 2013 (UTC)[reply]
I've changed the {{documentation}} template so that it supports both names. The category Category:Templates with /doc subpage contains all the templates that currently still have a subpage named /doc. Those pages should be moved to /documentation, but I'm not sure what the best way is to do that. —CodeCat 17:44, 17 March 2013 (UTC)[reply]
It seems that this is, for the most part, done. There may be stragglers, pages still at /doc that need to be moved. - -sche (discuss) 22:55, 26 January 2014 (UTC)[reply]


How to include documentation from other page?[edit]

w:Template:Documentation can include documentation from arbitrary pages instead of /documentation. How do I do that in Wiktionary, and if I don't, what solution does Wiktionary suggest instead to the same user story? JWBTH (talk) 16:35, 22 December 2023 (UTC)[reply]

Technically I can do {{#invoke:documentation|show|from=Pagename}}, but turning to #invoke for that purpose is obviously a bad solution. JWBTH (talk) 16:39, 22 December 2023 (UTC)[reply]