Template:Main: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
m Added an error message when no parameters are given.
mNo edit summary
Line 1: Line 1:
<includeonly>{{#If:{{{1|}}}|:<small>''Main article: [[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]''</small>|you must specify an article title when using <nowiki>{{main}}</nowiki>}}</includeonly>
<includeonly>{{#If:{{{1|}}}|:<small>''Main article: [[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]''</small>|<br>you must specify an article title when using <nowiki>{{main}}</nowiki>}}<br></includeonly>
<noinclude>This is a small template to link to a main article from a small sub-article on a different page.
<noinclude>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.

Revision as of 06:59, 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


{{main|Spaceship|Spaceship Page}} yields

Main article: Spaceship Page


{{main}} yields
you must specify an article title when using {{main}}