Difference between revisions of "Help:Templates"

From WikiCorporates
Jump to navigation Jump to search
Line 22: Line 22:
 
** [https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates MediaWiki:Parser Functions in Templates]
 
** [https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates MediaWiki:Parser Functions in Templates]
 
** http://community.wikia.com/wiki/Help:Template_parameters
 
** http://community.wikia.com/wiki/Help:Template_parameters
−
** [https://stackoverflow.com/questions/237229555/mediawiki-forcing-new-line-in-templates StackOverflow]
+
** [https://stackoverflow.com/questions/237229555/mediawiki-forcing-new-line-in-templates StackOverflow:MediaWiki:Forcing new line in templates]
  
 
[[Category:Help]]
 
[[Category:Help]]

Revision as of 03:56, 2 January 2018

Simple Template with one Parameter

Template Code: <span>''See main article: [[{{{1}}}]]''</span>
To Call: {{SeeMain|Article Name}}

Solution found here: MediaWiki: Optional Fields, MediaWiki: Missing Parameter

Simple Template with two Parameters; 2nd one is optional

Template Code: <span>''{{#if:{{{2|}}} | See main articles: [[{{{1}}}]], [[{{{2}}}]] | See main article: [[{{{1}}}]] }}''</span>
To Call: {{SeeMain|Article Name 1|Article Name 2}}

Notes

  • To specify the Template Category, underneath the code write:
    <noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude>