Template:Task heading: Difference between revisions

From Rosetta Code
Content added Content deleted
(Add edit links to the sections headers)
(expand description)
Line 1: Line 1:
<includeonly><div id="{{#replace:{{{1|}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1}}}<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;section=0&amp;summary=%2F*%20{{#replace:{{{1|}}}| |_}}%20*%2F%20}} edit]<span class="mw-editsection-bracket">]</span></span></div></includeonly><noinclude>
<includeonly><div id="{{#replace:{{{1|}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1}}}<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;section=0&amp;summary=%2F*%20{{#replace:{{{1|}}}| |_}}%20*%2F%20}} edit]<span class="mw-editsection-bracket">]</span></span></div></includeonly><noinclude>
This template can be used to show a header inside the introduction of a task page (i.e. the part above the TOC), in order to break up long task descriptions into multiple sections.
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.


Details:
The header is styled exactly the same way as the header of the TOC, which makes it look nice and tidy.

* 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.
* 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.)''


;Usage:
;Usage:
: The first argument is the header title to show.
: The first argument is the heading title to show.


;Example:
;Example:

Revision as of 10:56, 20 August 2016

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.
Even if the task description is short, adding a single {{introheader|Task}} above it can be valuable for the edit link.

Details:

  • 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.
  • 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.)
Usage
The first argument is the heading title to show.
Example
{{introheader|The task}}
...
{{introheader|Test cases}}
...
{{introheader|See also}}
...

Which renders as:

...
...
...



This is a template. There are many others. See Category:RCTemplates for a complete list of templates.