Difference between revisions of "Template:Infobox aircraft begin/doc"

From blackwiki
Jump to navigation Jump to search
imported>Trialpears
 
(51 intermediate revisions by 27 users not shown)
Line 1: Line 1:
{{documentation subpage}}
+
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
+
{{high-use|12947}}
<includeonly>{{intricate template}}</includeonly>
+
{{Tracks Wikidata|P18|cat=No local image but image on Wikidata}}
 +
{{Lua|Module:InfoboxImage}}
  
 
==Usage==
 
==Usage==
 +
{| {{Parameter names example |_template= |name |logo |image |size |alt |caption |long caption}}
 +
|}
 +
{| {{Parameter names example |_template= |name |logo |image |image_size |alt |long caption}}
 +
|}
  
This template acts to provide common formatting for other aircraft-related infoboxes. It (and any boxes that follow it) must be enclosed by <code>{|</code> and <code>|}<code> that enclose a wiki-table (see [[Help:Tables]]).  
+
This template acts to provide common formatting for other aircraft-related infoboxes. It (and any boxes that follow it) must be enclosed by <code>{|</code> and <code>|}</code> that enclose a wiki-table (see [[Help:Tables]]).  
  
 
<code>
 
<code>
<nowiki>{|{{</nowiki>Infobox Aircraft Begin<br>
+
<nowiki>{|{{</nowiki>Infobox aircraft begin<br>
&nbsp;|''parameters go here''<br>
 
<nowiki>}}{{</nowiki>Infobox Aircraft Type<br>
 
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
 
<nowiki>}}</nowiki><br>
 
<nowiki>}}</nowiki><br>
Line 17: Line 20:
 
</code>
 
</code>
  
===Examples===
 
 
For an article on an aircraft type, use:
 
For an article on an aircraft type, use:
  
 
<code>
 
<code>
<nowiki>{|{{</nowiki>Infobox Aircraft Begin<br>
+
<nowiki>{|{{</nowiki>Infobox aircraft begin<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
<nowiki>}}{{</nowiki>Infobox Aircraft Type<br>
+
<nowiki>}}{{</nowiki>Infobox aircraft type<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
 
<nowiki>}}</nowiki><br>
 
<nowiki>}}</nowiki><br>
Line 32: Line 34:
  
 
<code>
 
<code>
<nowiki>{|{{</nowiki>Infobox Aircraft Begin<br>
+
<nowiki>{|{{</nowiki>Infobox aircraft begin<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
<nowiki>}}{{</nowiki>Infobox Aircraft Engine<br>
+
<nowiki>}}{{</nowiki>Infobox aircraft engine<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
 
<nowiki>}}</nowiki><br>
 
<nowiki>}}</nowiki><br>
Line 40: Line 42:
 
</code>
 
</code>
  
Multiple templates can be stacked one after the other. For example, where the only example built of a particular aircraft type also had an individually noteworthy career (eg, ''[[The Spirit of St. Louis]]'', use:
+
Multiple templates can be stacked one after the other. For example, where the only example built of a particular aircraft type also had an individually noteworthy career (e.g., ''[[The Spirit of St. Louis]]'', use:
  
 
<code>
 
<code>
<nowiki>{|{{</nowiki>Infobox Aircraft Begin<br>
+
<nowiki>{|{{</nowiki>Infobox aircraft begin<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
<nowiki>}}{{</nowiki>Infobox Aircraft Type<br>
+
<nowiki>}}{{</nowiki>Infobox aircraft type<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
<nowiki>}}{{</nowiki>Infobox Aircraft Career<br>
+
<nowiki>}}{{</nowiki>Infobox aircraft career<br>
 
&nbsp;|''parameters go here''<br>
 
&nbsp;|''parameters go here''<br>
 
<nowiki>}}</nowiki><br>
 
<nowiki>}}</nowiki><br>
Line 53: Line 55:
 
</code>
 
</code>
  
Modules currently available for the modular Infobox Aircraft are:
+
==Other modules==
 +
Other modules currently available for the modular Infobox aircraft are:
 +
 
 +
; {{tl|Infobox aircraft type}} : General data fields relevant to an aircraft type (or subtype), such as role, manufacturer, number produced, date of first flight (but ''not'' technical specifications)
  
; {{tl|Infobox Aircraft Begin}} : Must be included in every stack. This template carries the name, image, image caption, and formatting for the rest of the stack.
+
; {{tl|Infobox aircraft career}} : Data fields relevant to an individually significant airframe, such as construction number, registration number, military serial, current preservation status.
  
; {{tl|Infobox Aircraft Type}} : General data fields relevant to an aircraft type (or subtype), such as role, manufacturer, number produced, date of first flight (but ''not'' technical specifications)
+
; {{tl|Infobox aircraft engine}} : General data fields relevant to an aircraft engine, such as type, manufacturer, major applications (but ''not'' technical specifications)
  
; {{tl|Infobox Aircraft Career}} : Data fields relevant to an individually significant airframe, such as construction number, registration number, military serial, current preservation status.
+
; {{tl|Infobox aircraft program}} : General data on programs to develop types (and subtypes) of aircraft and aircraft engines, but not on the aircraft or engines themselves or their technical specifications
  
; {{tl|Infobox Aircraft Engine}} : General data fields relevant to an aircraft engine, such as type, manufacturer, major applications (but ''not'' technical specifications)
+
==Parameters==
 +
; name : The subject of the article. When naming aircraft and engines, please do not repeat the name of the manufacturer unless the name would be otherwise ambiguous. For example, "P-51 Mustang" does not need to have "North American" in front of it: the name itself is unambiguous and the manufacturer will be stated just a few lines down in the Type Infobox.
 +
; image : In the format ''filename.xxx'' format with or without 'File:' tag
 +
; size {{nobold|or}} image_size : Allows for the specification of image size; default is 250px.
 +
; alt : Alt text for the image, for readers who cannot see the image. Please see [[WP:ALT]] for details.
 +
; image_border : set to yes to add a thin border to the image
 +
; caption : A short (one- or two-line) caption for the image. If it isn't descriptive, then please skip it. "Boeing 747" or "Boeing 747 in flight" should be patently obvious from the context and does not need to be captioned. "A Qantas Airlines Boeing 747-400 at Heathrow Airport in 2006" is an example of a useful caption. Captions will appeared centred in the infobox.
 +
; long caption : A longer (multi-line), more detailed caption may be desirable from time to time. Long captions will appear left-justified in the infobox. Won't display if '''caption''' is defined.
  
; {{tl|Seriesbox Aircraft Categories}} : Non-parameterised seriesbox for broad categories of aircraft, such as airship, helicopter, glider.
+
==Template with notes==
 +
<!-- Abstract usage of the template -->
 +
<pre style="overflow:auto">
 +
{{Infobox aircraft begin
 +
|name = REQUIRED <!-- avoid stating manufacturer (it's stated 3 lines below) unless name used by other aircraft manufacturers -->
 +
|image = <!-- in the ''File:filename'' format with no image tags.  In-flight images are preferred for aircraft. -->
 +
|image_border = <!-- Add "yes" (without quotes) to add a thin border to the image -->
 +
|alt = <!-- Alt text for main image -->
 +
|caption = <!-- Image caption; if it isn't descriptive, please skip. -->
 +
|long caption = <!-- A longer (multi-line), more detailed caption may be desirable from time to time. Text is left-justified in the infobox. -->
 +
}}
 +
</pre>
  
===Parameters===
+
==Example==
;name : The subject of the article. When naming aircraft and engines, please do not repeat the name of the manufacturer unless the name would be otherwise ambiguous. For example, "P-51 Mustang" does not need to have "North American" in front of it: the name itself is unambiguous and the manufacturer will be stated just a few lines down in the Type Infobox.
+
<pre style="overflow:auto">
;image : In the format ''Image:filename'' format with no image tags
+
<nowiki> |name = Foo</nowiki>
;caption : A short (one- or two-line) caption for the image. If it isn't descriptive, then please skip it. "Boeing 747" or "Boeing 747 in flight" should be patently obvious from the context and does not need to be captioned. "A Qantas Airlines Boeing 747-400 at Heathrow Airport in 2006" is an example of a useful caption. Captions will appeared centred in the infobox.
+
<nowiki> |image = Foo.jpg</nowiki>
;long caption : A longer (multi-line), more detailed caption may be desirable from time to time. Long captions will appear left-justified in the infobox.
+
<nowiki> |image_border = yes</nowiki>
 +
<nowiki> |size = 300px</nowiki>
 +
<nowiki> |alt = an aircraft in flight</nowiki>
 +
<nowiki> |caption = The Foo on its first flight</nowiki>
 +
</pre>
  
 +
== Tracking categories ==
 +
* {{clc|Pages using deprecated image syntax}} – Used by [[Module:InfoboxImage]] to track articles where an infobox uses image syntax in the format <kbd><nowiki>|image=[[File:Example.jpg]]</nowiki></kbd>. To exclude articles from this category, change it to {{samp|<nowiki>|image=Example.jpg</nowiki>}}.
 +
* {{clc|No local image but image on Wikidata}} – Used by [[Template:Wikidata image]] to track articles where an infobox has no image but [[Wikidata]] has an image name. To exclude articles from this category, add an image or {{para|nocat_wdimage|yes}} to the infobox.
  
<noinclude>[[Category:WikiProject Aviation template instructions|Infobox Aircraft]]</noinclude><includeonly>
+
== Supporting templates and modules ==
 +
The following templates are used directly from this template:
 +
* {{tl|WPMILHIST Infobox style}}
 +
* {{tl|Wikidata image}}
  
{{#ifeq:{{{noheader|}}}|yes||
+
==TemplateData==
 +
{{Collapse top|title=[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
 +
{{TemplateData header|noheader=1}}
 +
<templatedata>
 +
{
 +
"params": {
 +
"name": {
 +
"label": "Name",
 +
"type": "string",
 +
"required": false,
 +
"description": "Name of the aircraft without the name of the manufacturer"
 +
},
 +
"image": {
 +
"label": "Image",
 +
"type": "string/wiki-page-name",
 +
"required": false,
 +
"description": "Image of the aircraft"
 +
},
 +
"size": {
 +
"label": "Image Size",
 +
"type": "string",
 +
"required": false,
 +
"description": "Size of image (eg. 300px)",
 +
"default": "250px"
 +
},
 +
"alt": {
 +
"label": "Alternative Text",
 +
"type": "string",
 +
"required": false,
 +
"description": "Alternative text to display if image does not display for whatever reason"
 +
},
 +
"caption": {
 +
"label": "Caption",
 +
"type": "string",
 +
"required": false,
 +
"description": "Caption for the image"
 +
},
 +
"long caption": {
 +
"label": "Long caption",
 +
"type": "string",
 +
"required": false,
 +
"description": "A longer (multi-line), more detailed caption may be desirable from time to time. Long captions will appear left-justified in the infobox."
 +
}
 +
},
 +
"format": "block"
 +
}
 +
</templatedata>
 +
{{Collapse bottom}}
  
[[Category:Air transport infobox templates|Aircraft]]
+
<noinclude>
[[Category:WikiProject Space templates|Aircraft]]
+
[[Category:WikiProject Aviation template instructions|Infobox Aircraft Begin]]
 +
</noinclude><includeonly>{{Sandbox other||
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 +
[[Category:Air transport infobox templates|Aircraft Begin]]
 +
[[Category:Aircraft templates]]
 +
[[Category:Templates that add a tracking category]]
  
[[ar:قالب:بداية معلومات طائرة]]
 
[[ja:Template:Infobox Aircraft Begin]]
 
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 22:24, 9 July 2020

Template:Tracks Wikidata

Usage

This template acts to provide common formatting for other aircraft-related infoboxes. It (and any boxes that follow it) must be enclosed by {| and |} that enclose a wiki-table (see Help:Tables).

{|{{Infobox aircraft begin
 |parameters go here
}}
|}

For an article on an aircraft type, use:

{|{{Infobox aircraft begin
 |parameters go here
}}{{Infobox aircraft type
 |parameters go here
}}
|}

Or, for an article on an aero engine, use:

{|{{Infobox aircraft begin
 |parameters go here
}}{{Infobox aircraft engine
 |parameters go here
}}
|}

Multiple templates can be stacked one after the other. For example, where the only example built of a particular aircraft type also had an individually noteworthy career (e.g., The Spirit of St. Louis, use:

{|{{Infobox aircraft begin
 |parameters go here
}}{{Infobox aircraft type
 |parameters go here
}}{{Infobox aircraft career
 |parameters go here
}}
|}

Other modules

Other modules currently available for the modular Infobox aircraft are:

{{Infobox aircraft type}} 
General data fields relevant to an aircraft type (or subtype), such as role, manufacturer, number produced, date of first flight (but not technical specifications)
{{Infobox aircraft career}} 
Data fields relevant to an individually significant airframe, such as construction number, registration number, military serial, current preservation status.
{{Infobox aircraft engine}} 
General data fields relevant to an aircraft engine, such as type, manufacturer, major applications (but not technical specifications)
{{Infobox aircraft program}} 
General data on programs to develop types (and subtypes) of aircraft and aircraft engines, but not on the aircraft or engines themselves or their technical specifications

Parameters

name 
The subject of the article. When naming aircraft and engines, please do not repeat the name of the manufacturer unless the name would be otherwise ambiguous. For example, "P-51 Mustang" does not need to have "North American" in front of it: the name itself is unambiguous and the manufacturer will be stated just a few lines down in the Type Infobox.
image 
In the format filename.xxx format with or without 'File:' tag
size or image_size 
Allows for the specification of image size; default is 250px.
alt 
Alt text for the image, for readers who cannot see the image. Please see WP:ALT for details.
image_border 
set to yes to add a thin border to the image
caption 
A short (one- or two-line) caption for the image. If it isn't descriptive, then please skip it. "Boeing 747" or "Boeing 747 in flight" should be patently obvious from the context and does not need to be captioned. "A Qantas Airlines Boeing 747-400 at Heathrow Airport in 2006" is an example of a useful caption. Captions will appeared centred in the infobox.
long caption 
A longer (multi-line), more detailed caption may be desirable from time to time. Long captions will appear left-justified in the infobox. Won't display if caption is defined.

Template with notes

{{Infobox aircraft begin
 |name = REQUIRED <!-- avoid stating manufacturer (it's stated 3 lines below) unless name used by other aircraft manufacturers -->
 |image = <!-- in the ''File:filename'' format with no image tags.  In-flight images are preferred for aircraft. -->
 |image_border = <!-- Add "yes" (without quotes) to add a thin border to the image -->
 |alt = <!-- Alt text for main image -->
 |caption = <!-- Image caption; if it isn't descriptive, please skip. -->
 |long caption = <!-- A longer (multi-line), more detailed caption may be desirable from time to time. Text is left-justified in the infobox. -->
}}

Example

 |name = Foo
 |image = Foo.jpg
 |image_border = yes
 |size = 300px
 |alt = an aircraft in flight
 |caption = The Foo on its first flight

Tracking categories

Supporting templates and modules

The following templates are used directly from this template:

TemplateData

TemplateData documentation used by VisualEditor and other tools
See the monthly parameter usage report for this template.

TemplateData for Infobox aircraft begin

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

Name of the aircraft without the name of the manufacturer

Stringoptional
Imageimage

Image of the aircraft

Pageoptional
Image Sizesize

Size of image (eg. 300px)

Default
250px
Stringoptional
Alternative Textalt

Alternative text to display if image does not display for whatever reason

Stringoptional
Captioncaption

Caption for the image

Stringoptional
Long captionlong caption

A longer (multi-line), more detailed caption may be desirable from time to time. Long captions will appear left-justified in the infobox.

Stringoptional