Difference between revisions of "Template:Mediawiki"
From GeoGebra Manual
en>Reach Out to the Truth (Prevent link breakage when viewing pages on the secure server. This hopefully won't cause problems on other wikis, which shouldn't have $wgSiteName set to MediaWiki anyway.) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ #ifeq: | {{ #ifeq: | ||
− | {{ | + | {{SERVERNAME}} |
− | | | + | | www.mediawiki.org |
| [[{{{1}}}|{{{2|{{{1}}}}}}]] | | [[{{{1}}}|{{{2|{{{1}}}}}}]] | ||
− | | [ | + | | [http://www.mediawiki.org/wiki/{{urlencode:{{{1}}}}} {{{2|{{{1}}}}}}] |
}}<noinclude> | }}<noinclude> | ||
---- | ---- | ||
− | This template links to a page on | + | This template links to a page on from the [[Help:Contents|Help pages]]. The template has two parameters: |
# Pagename, optionally preceded by an interwiki link prefix valid on mediawiki.org | # Pagename, optionally preceded by an interwiki link prefix valid on mediawiki.org | ||
# (optional) Link description | # (optional) Link description | ||
− | |||
{{ #ifeq: | {{ #ifeq: | ||
− | {{ | + | {{SERVERNAME}} |
− | | | + | | www.mediawiki.org |
| This is so that the public domain help pages - which can be freely copied and included in other sites - have correct links to Mediawiki: | | This is so that the public domain help pages - which can be freely copied and included in other sites - have correct links to Mediawiki: | ||
− | * on external sites, it creates an | + | * on external sites, it creates an external link |
* on Mediawiki, it creates an internal or interwiki link | * on Mediawiki, it creates an internal or interwiki link | ||
'''All''' links from the Help namespace to other parts of the mediawiki.org wiki should use this template.}} | '''All''' links from the Help namespace to other parts of the mediawiki.org wiki should use this template.}} | ||
− | + | Demo of interwiki link: | |
− | <nowiki>{{mediawiki| | + | <nowiki> |
+ | {{mediawiki|w:Help:Calculation|Help:Calculation}}</nowiki> gives either <nowiki>[[w:Help:Calculation|Help:Calculation]] or [http://www.mediawiki.org/wiki/m%3AHelp%3ACalculation Help:Calculation]</nowiki>,rendered as [[w:Help:Calculation|Help:Calculation]] or [http://www.mediawiki.org/wiki/m%3AHelp%3ACalculation Help:Calculation], respectively. | ||
− | + | [[Category:Link templates|MediaWiki]] | |
− | |||
− | [[Category: | ||
</noinclude> | </noinclude> |
Latest revision as of 03:33, 6 January 2011
This template links to a page on from the Help pages. The template has two parameters:
- Pagename, optionally preceded by an interwiki link prefix valid on mediawiki.org
- (optional) Link description
Demo of interwiki link:
{{mediawiki|w:Help:Calculation|Help:Calculation}} gives either [[w:Help:Calculation|Help:Calculation]] or [http://www.mediawiki.org/wiki/m%3AHelp%3ACalculation Help:Calculation],rendered as Help:Calculation or Help:Calculation, respectively.