Template:ArgDocLine/doc: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
Content added Content deleted
| No edit summary Tag: Reverted | No edit summary Tag: Manual revert | ||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| {{Documentation}} | {{Documentation}} | ||
| The [[Template:ArgDocHeader|ArgDocHeader]], [[Template:ArgDocLine|ArgDocLine]], and [[Template:ArgDocFooter|ArgDocFooter]] templates should be used together to build tables of arguments for template documentation. | |||
| This template is used to make it possible to insert <nowiki>[[ to a template, for example a template that automatically inserts links. The template would automatically add [[ and ]] around a specific parameter, but you want it to contain 2 seperate links. Then you should do {{template|link 1]] and {{l|o}}link 2}} as adding [[ instead of {{l|o}} would cause the template to break.</nowiki> | |||
| <pre> | |||
| For the first parameter, the following options are possible: | |||
| {{ArgDocHeader}} | |||
| {{ArgDocLine | |||
| |name =  | |||
| |description =  | |||
| |optional =  | |||
| |values =  | |||
| |default =  | |||
| }} | |||
| {{ArgDocFooter}} | |||
| </pre> | |||
| ==Arguments== | |||
| o and open (resulting in {{l|o}})<br/> | |||
| c and close (resulting in {{l|c}}) | |||
| {{ArgDocHeader|caption=ArgDocHeader}} | |||
| {{ArgDocLine | |||
| |name = caption | |||
| |description = Caption for the table | |||
| |optional = Yes | |||
| |values = Any text | |||
| }} | |||
| {{ArgDocFooter}}{{ArgDocHeader|caption=ArgDocLine}} | |||
| {{ArgDocLine | |||
| |name = name | |||
| |description = Name of the argument. Do not set this if the argument is anonymous (unnamed). | |||
| |optional = Yes | |||
| |values = Any text | |||
| }} | |||
| {{ArgDocLine | |||
| |name = description | |||
| |description = Description of the argument | |||
| |optional = Yes | |||
| |values = Any text | |||
| }} | |||
| {{ArgDocLine | |||
| |name = optional | |||
| |description = Is the argument optional? | |||
| |optional = Yes | |||
| |values = <code>Yes</code> <code>No</code> | |||
| |default = <code>No</code> | |||
| }} | |||
| {{ArgDocLine | |||
| |name = values | |||
| |description = Values the argument accepts | |||
| |values = Any text | |||
| }} | |||
| {{ArgDocLine | |||
| |name = default | |||
| |description = The default value for the argument, if any | |||
| |optional = Yes | |||
| |values = Any text | |||
| }} | |||
| {{ArgDocFooter}} | |||
Latest revision as of 11:28, 17 October 2024
The ArgDocHeader, ArgDocLine, and ArgDocFooter templates should be used together to build tables of arguments for template documentation.
{{ArgDocHeader}}
{{ArgDocLine
|name = 
|description = 
|optional = 
|values = 
|default = 
}}
{{ArgDocFooter}}
Arguments
| Argument | Optional? | ||||
|---|---|---|---|---|---|
| caption | Caption for the table |  | |||
| Values | Any text | ||||
