Template:Align/Doc: Difference between revisions
Appearance
Created page with "This is a helper template that aligns its content in the centre, if the align parameter is set accordingly. This shouldn't be used in writing articles; its use is to avoid repeating substantial parts of templates when implementing conditional alignment. {{align|align=center|Some content}} === Usage === In a template, wrap the content you want to conditionally align within this template, and forward the align argument: {{code|lang=mediawiki|line=no|<nowiki>{{align|ali..." |
|||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Helper template to conditionally align content in the centre. Do not use in usual articles." | "description": "Helper template to conditionally align content in the centre. Do not use in usual articles.", | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Content", | "label": "Content", | ||
"description": "The content to be aligned", | "description": "The content to be aligned", | ||
" | "type": "content", | ||
"required": true | |||
}, | }, | ||
"align": { | "align": { | ||
"label": "Alignment", | "label": "Alignment", | ||
"description": "The alignment of the content. Any values other than 'center' have no effect.", | "description": "The alignment of the content. Any values other than 'center' have no effect.", | ||
" | "type": "string", | ||
"suggested": true, | |||
"suggestedvalues": [ | |||
"center", | |||
"left", | |||
"right" | |||
] | |||
} | } | ||
} | } |
Latest revision as of 15:51, 11 June 2025
This is a helper template that aligns its content in the centre, if the align parameter is set accordingly. This shouldn't be used in writing articles; its use is to avoid repeating substantial parts of templates when implementing conditional alignment.
Some content
Usage
In a template, wrap the content you want to conditionally align within this template, and forward the align argument:
{{align|align={{{align|}}}|...}}