Template:Task heading: Difference between revisions

default heading to "Task", and update description to reflect this and the name change
m (Smls moved page Template:Introheader to Template:Task heading: make its intended purpose more clear (and "heading" is the correct word, not "header".))
(default heading to "Task", and update description to reflect this and the name change)
Line 1:
<includeonly><div id="{{#replace:{{{1|Task}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1|Task}}}<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;section=0&amp;summary=%2F*%20{{#replace:{{{1|Task}}}| |_}}%20*%2F%20}} edit]<span class="mw-editsection-bracket">]</span></span></div></includeonly><noinclude>
This template can be used to show a section heading inside the introduction of a task page (i.e. the part above the table of contents), in order to break up long task descriptions into multiple sections.<br>
Even if the task description is short, adding a single <code><nowiki>{{introheader|Task}}</nowiki></code> above it can be valuable for the edit link.
 
This template can be used to show a heading with an edit link above the task description on a [[:Category:Programming Tasks|task page]].
Details:
 
Multiple headings can also be used to break longer task descriptions up into logical subsections (see examples below).
* The heading is styled exactly the same way as the header of the TOC, which makes it look nice and tidy.
 
* It doesn't appear in the TOC itself.
;Details:
* It has an edit link. ''(Due to technical limitations, it will give you the whole task description to edit, not just the specific section of it. But that's still better than getting the whole article with all solutions.)''
 
* The heading is styled exactly the same way as the header of the TOC (table of contents), which makes it look nice and tidy.
* It doesnwon't appear in the TOC itself.
* It has an edit link. ''(Due to technical limitations, it will give you the whole task description to edit, not just the specific sectionsubsection of it. But that's still better than getting the whole article, withincluding all solutions, to edit.)''
 
;Usage:
: The first argument is the heading title to show.
 
The first and only argument is the title of the heading to show. If it is not specified, it defaults to the word "Task".
;Example:
 
{| class=wikitable
|-
! Usage example
! Renders as
|-
| style="vertical-align:top; padding:1em" |
<pre style="border:none; margin:0; padding:0">
{{task heading}}
 
<pre>
{{introheader|The task}}
...
 
{{introheadertask heading|Test cases}}
 
...
{{introheader|See also}}
...
</pre>
 
{{introheadertask heading|See also}}
Which renders as:
 
...
: {{introheader|The task}}
</pre>
: ...
| style="vertical-align:top; padding:0 1em" |
: {{introheader|Test cases}}
{{task heading}}
: ...
: ...
: {{introheader|See also}}
: {{introheadertask heading|Test cases}}
: ...
: ...
: {{introheadertask heading|See also}}
: ...
|}
 
{{template}}</noinclude>
Anonymous user