User:Anomie/Template:Subtitle/doc
![]() | This is a documentation subpage for User:Anomie/Template:Subtitle. It may contain usage information, categories and other content that is not part of the original user template page. |
This template allows for displaying the second portion of the page title as a subtitle.
Usage
[edit]- {{User:Anomie/Template:Subtitle|Title|subtitle}}
- {{User:Anomie/Template:Subtitle|Title|punctuation|subtitle|punctuation}}
Cautions
[edit]This template is subject to the same restrictions as the {{DISPLAYTITLE}} magic word. In particular, the text of the parameters when concatenated must match the page title.
When used with two parameters, a space is automatically inserted between the title and subtitle when constructing the page name. This allows the common case "Title (subtitle)" to work as {{User:Anomie/Template:Subtitle|Title|(subtitle)}} without requiring the user to remember to explicitly include the space.
When used with four parameters, no space is inserted. This allows for use on a page like "City, Country" as {{User:Anomie/Template:Subtitle|City|, |Country}}. But do note that the second parameter is comma-space, not just comma.
Examples
[edit]- User:Anomie/Template:Subtitle/doc/example1 (subtitle)
- User:Anomie/Template:Subtitle/doc/example2 (subtitle)
- User:Anomie/Template:Subtitle/doc/City, Country
Bugs
[edit]This template should not use inline CSS. Instead, the following should be added to MediaWiki:Common.css:
span.subtitle {
display:block;
font-size:75%;
font-weight:normal;
line-height:normal;
}
span.subtitle-punctuation {
display:none;
}