Template:Main/doc

From OpenStreetMap Wiki
Jump to: navigation, 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 optional second parameter allows tou to change the displayed label of the link (if it is not specified, its default value is identical to the first mandatory parameter).

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

Note: the lettercase of the value specified to the optional lang= (or ns=) parameter (which should be a valid language code) is not significant.

Examples

  • {{Main|Main Page}} gives:
    Main article: Main Page
  • {{Main|Main Page|Hauptseite}} gives:
    Main article: Hauptseite
  • {{Main|ns=DE|Main Page|Hauptseite}} gives:
    Hauptartikel: Hauptseite
  • {{Main|Fi:Main Page|Pääsivu}} gives:
    Main article: Pääsivu
  • {{Main|ns=fi|Fi:Main Page|Pääsivu}} gives:
    Pääartikkeli: Pääsivu
  • {{Main|Cs:Main Page|Domovská stránka}} gives:
    Main article: Domovská stránka
  • {{Main|ns=cs|Cs:Main Page|Domovská stránka}} gives:
    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}}.