Template:Main/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

You can use this template in situations where you have a small summarising paragraph, but where there is already a "main" page about that topic elsewhere on the wiki. Use it at the head of the paragraph. Summary paragraphs can be a good idea. Try to minimise duplication (Wiki guidelines#Duplication)

Usage

The mandatory first parameter is the full name of the target page for the displayed link (including its namespace if needed).

The |l1 = parameter allows you to change the displayed label of the link (if it is not specified, its default value is identical to the first mandatory parameter). The second parameter is deprecated alias for |l1 = but will eventually be repurposed to link to a second page. Pages that specify the second parameter are automatically added to Category:Pages using main with deprecated parameters.

The Template detects the namespace (if there's one) in the current page, otherwise it attempts to detect a known language code prefix in the page name; then it tries to translate the text for "Main article:". If the current page is not in a known specific namespace for a language (currently this is limited to pages in the following namespaces: DE, ES, FR, IT, JA, NL, RU) you have to use the optional lang= (or ns=) parameter to specify the desired language (in which case there will be no guess).

Notes:

  • The lettercase of the value specified to the optional lang= (or the deprecated alias ns=) parameter (which should be a valid language code) is not significant.
  • This lang= (or ns=) parameter (or the optional second parameter for the displayed label) does not influence the target of the link, which remains the full page name given in the first mandatory parameter.

Examples

  • {{Main|Main Page}}
Main article: Main Page
  • {{Main|Main Page|l1=Hauptseite}}
Main article: Hauptseite
  • {{Main|lang=de|Main Page|l1=Hauptseite}}
Hauptartikel: Hauptseite
  • {{Main|Fi:Main Page|l1=Pääsivu}}
Main article: Pääsivu
  • {{Main|lang=fi|Fi:Main Page|l1=Pääsivu}}
Pääartikkeli: Pääsivu
  • {{Main|Cs:Main Page|l1=Domovská stránka}}
Main article: Domovská stránka
  • {{Main|lang=cs|Cs:Main Page|l1=Domovská stránka}}
Hlavní článek: Domovská stránka

See also

  • {{Langcode}} — used to determine the language code of the current page, when the lang= (or ns=) parameter is not specified in {{Main}}.