Jump to content

User talk:Xiong/Template:Helpbox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Purpose[edit]

{{helpbox}} is a toolmaker's tool. Templates, like any other code, should be documented (as this template is on this page). For standard templates generated with {{divbox}}, {{helpbox}} provides a compact, standard link to docs.

Compare {{tl}}, which generates copyable markup which doubles as a clickable link. As useful as this is, the actual page of some templates is all but incomprehensible, as the markup source is rendered without required parameters.

Usage[edit]

{{helpbox|talkpage}}

Insert this template within <div> tags of a template for which you wish to provide documentation. The only parameter (required) is the name of the talk page on which the docs are to be found.

As this template floats right, you may wish to clear the float at some point; however, this has not yet been found necessary.

  • Note that it is completely inappropriate to attach this helpbox to templates that do not generate a <div> of some kind, with border and/or background. If thrown onto a page "loose", it will float all the way to the right of the main content area and appear unconnected to anything in particular.
  • Note that to achieve standard position within the documented template, {{helpbox}} must appear as the first line of template content. See Example.

Example[edit]

This is how not to use it! →


History[edit]

Created — Xiongtalk* 07:56, 2005 August 11 (UTC)

Minor improvements:

  • Changed link symbol from i to ?
  • Cursor now changes to "help" when hovered.

Xiongtalk* 14:31, 2005 August 15 (UTC)

Fixed display problem with white color. — Xiongtalk* 17:28, 29 December 2005 (UTC)[reply]

Discussion[edit]

Parameter elimination contest[edit]

I'm pretty pleased with myself; this is the sort of tool taken for granted in more sophisticated development environments. It drives me nuts to see templates with no docs, and one of my long-term projects is to go through and document all the ones that seem worth keeping. Complementary to this is a discreet link to the docs so they may be read.

But (and is there not always a fly in the ointment?) I cannot think for the life of me how to do away with the target parameter. Given that a template's talk page is the logical and correct place for its documentation, I see no reason to allow any flexibility here. What I want is markup that "detonates" precisely when {{helpbox}} is instanced within the source of the template in question.

I should dearly love to see this solution and I offer by way of incentive to the clever wizard who manages it an Old #1 Barnstar Teeshirt or equivalent bit of ephemera. Don't forget to leave me your size. — Xiongtalk* 08:20, 2005 August 11 (UTC)