Template:Main: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>:<small>{{#If:{{{1|}}}|''Main article: [[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]''|You must specify an article title when using <nowiki>{{main}}</nowiki>.}}</small></includeonly> | <includeonly>:<small>{{#If:{{{1|}}}|''Main article: [[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]''|You must specify an article title when using <nowiki>{{Template:main}}</nowiki>.}}</small></includeonly> | ||
This is a small template to link to a main article from a small sub-article on a different page. | |||
It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error. | It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error. | ||
| Line 8: | Line 8: | ||
{{main|Spaceship|}} | {{main|Spaceship|}} | ||
<nowiki>{{main|Spaceship|Spaceship | <nowiki>{{main|Spaceship|Spaceship page}}</nowiki> yields | ||
{{main|Spaceship|Spaceship | {{main|Spaceship|Spaceship page}} | ||
<nowiki>{{main}}</nowiki> yields | <nowiki>{{main}}</nowiki> yields | ||
{{main}} | {{main}} | ||
Revision as of 21:58, 19 April 2009
This is a small template to link to a main article from a small sub-article on a different page. It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error.
examples:
{{main|Spaceship}} yields
- Main article: Spaceship
This is a small template to link to a main article from a small sub-article on a different page. It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error.
examples:
{{main|Spaceship}} yields Template loop detected: Template:Main
{{main|Spaceship|Spaceship page}} yields Template loop detected: Template:Main
{{main}} yields Template loop detected: Template:Main
{{main|Spaceship|Spaceship page}} yields
- Main article: Spaceship page
This is a small template to link to a main article from a small sub-article on a different page. It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error.
examples:
{{main|Spaceship}} yields Template loop detected: Template:Main
{{main|Spaceship|Spaceship page}} yields Template loop detected: Template:Main
{{main}} yields Template loop detected: Template:Main
{{main}} yields
- You must specify an article title when using {{Template:main}}.
This is a small template to link to a main article from a small sub-article on a different page. It takes as parameters the name of the main article and an optional alternative name (if no alternative name is given then the link text is the title of the main article). If no parameters or blank parameters are given then the template gives an error.
examples:
{{main|Spaceship}} yields Template loop detected: Template:Main
{{main|Spaceship|Spaceship page}} yields Template loop detected: Template:Main
{{main}} yields Template loop detected: Template:Main