Difference between revisions of "Template:Howto"

From VideoLAN Wiki
Jump to navigation Jump to search
(Transition to parameter "silent" for suppressing the box)
(Copy-edit, humour)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{silent|}}}||</includeonly>{{{!}} cellspacing="2" cellpadding="3" class="widebox"
+
{{#if:{{{1<includeonly>|</includeonly>}}}
{{!}}align="left"{{!}}This page describes ''how to {{lcfirst:{{{1}}}}}''.
+
  | {{{!}} class="widebox center cellpadding-3px" style="border-spacing:2px;"
{{!}}align="right"{{!}}<span style="white-space:nowrap;">[[VLC HowTo{{!}}Other "how to" pages]]</span>
+
    {{!}}style="text-align: left;"{{!}}This page describes ''how to {{lcfirst:{{{1<noinclude>|do something</noinclude>}}}}}''.
{{!}}}<includeonly>}}</includeonly>
+
    {{!}}class="nowrap" style="text-align: right;"{{!}}[[VLC HowTo{{!}}Other "how to" pages]]
{{#if: {{{nosort|}}} |   |<includeonly>{{DEFAULTSORT:{{#titleparts:{{FULLPAGENAME}}|1|2}}}}</includeonly>|noerror}}
+
    {{!}}}
{{ #if: {{{nocat|}}} |   | [[Category:How To]] }}<noinclude>
+
}}
 +
{{#switch:{{{nosort}}}|yes|y = |#default = <includeonly>{{DEFAULTSORT:{{#titleparts:{{FULLPAGENAME}}|1|2}}|noerror}}</includeonly>}}
 +
{{#switch:{{{nocat}}}|yes|y = |#default = [[Category:How To]]}}<noinclude>
 
== Usage ==
 
== Usage ==
 
Calling the template currently:
 
Calling the template currently:
# Auto-categorises pages to be members of [[:Category:How To]]
+
# Adds page to [[:Category:How To]]
# Corrects the sortkey: telling the system that [[VLC HowTo/Adjust audio delay]] ought to be filed as "'''A'''djust audio delay" (A) and not "'''V'''LC HowTo/Adjust audio delay" (V).
+
# Sorts page under correct title, rather than <code>V</code> for <del>Vendetta</del> <code>VLC HowTo</code>
 
# Displays a message '''(optional)'''
 
# Displays a message '''(optional)'''
#* If the first unnamed parameter is specified (e.g. {{<nowiki />howto|do something}}) a message will be shown similar to the above.
+
#* <code>{{{{PAGENAME}}<nowiki>}}</nowiki></code> no banner
#* Alternately, ''not'' passing anything to the first parameter (e.g. {{<nowiki />howto}}) suppresses the message altogether—however, the template still auto-categorises and auto-sorts.
+
#* <code>{{{{PAGENAME}}<nowiki>|play music with VLC}}</nowiki></code> banner: <samp>This page describes ''how to play music with VLC''.</samp>
  
{{DEFAULTCATEGORYSORT:*}}
+
[[Category:How To|*]]<!-- modifies sortkey -->
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 04:03, 9 June 2019

This page describes how to do something. Other "how to" pages

Usage

Calling the template currently:

  1. Adds page to Category:How To
  2. Sorts page under correct title, rather than V for Vendetta VLC HowTo
  3. Displays a message (optional)
    • {{Howto}} no banner
    • {{Howto|play music with VLC}} banner: This page describes how to play music with VLC.