Template:Main/doc: Difference between revisions

Explain the lately added second argument
ArrowHead294 (talk | contribs)
No edit summary
Line 1: Line 1:
<includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly>
<includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly>
== Usage ==
== Usage ==
Use an unnamed argument for the page you want to link to. Use a second unnamed argument for the displayed text.  
Use unnamed arguments for the page you want to link to. Use named arguments for the displayed text.


For example, if you type
For example, if you type


:<code><nowiki>{{Main|</nowiki>Special:Random|''Some page''}}</code>
:<code><nowiki>{{main|</nowiki>Special:Random|Frequently asked questions|l1=Some page|l2=FAQ}}</code>


you will get
you will get


:''Main article: [[Special:Random|Some page]]''
{{main|Special:Random|Frequently asked questions|l1=Some page|l2=FAQ}}


== Related templates ==
== Related templates ==
* [[Template: See also]]
* [[Template: See also]]
* [[Template: Distinguish]]
* [[Template: Distinguish]]