Difference between revisions of "Template:Part"

From Autopilot Wiki
Jump to: navigation, search
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>Individual, off-the-shelf components</noinclude>
+
<noinclude>
{| style="border: 1px solid; width:25em; float: right; font-size: 90%;"  
+
This is the "Part" template.
 +
It should be called in the following format:
 +
<pre>
 +
{{Part
 +
|Image=
 +
|Modality=
 +
|Part Type=
 +
|Manufacturer=
 +
|Product ID=
 +
|Product Page=
 +
|Datasheet=
 +
|External Datasheet=
 +
|Price=
 +
}}
 +
</pre>
 +
Edit the page to see the template text.
 +
</noinclude><includeonly>{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
 +
! style="text-align: center; background-color:#ccccff;" colspan="2" |<span style="font-size: larger;">{{PAGENAME}}</span>
 
|-
 
|-
|colspan="2" style="text-align: center;"| '''{{{Name}}}'''
+
{{#if:{{{Image|}}}|!colspan="2"{{!}}[[File:{{{Image|}}}{{!}}300px]]{{#set:Has Image=File:{{{Image|}}}}}}}
 
|-
 
|-
! [[Property:modality | Modality]]
+
! Modality
| [[Is Modality::{{{modality}}}]]
+
| {{#arraymap:{{{Modality|}}}|,|x|[[Modality::x]]}}
 +
 
 
|-
 
|-
! [[Property:Manufactured By | Manufacturer]]
+
! Part Type
| [[Manufactured By::{{{manufacturer}}} ]]
+
| {{#arraymap:{{{Part Type|}}}|,|x|[[Is Part Type::x]]}}
 +
 
 
|-
 
|-
! [[Property:Datasheet | Datasheet]]
+
! Manufacturer
| [[Datasheet::{{{datasheet|n/a}}}]]
+
| [[Manufactured By::{{{Manufacturer|}}}]]
 +
|-
 +
! Product ID/Part Number
 +
| [[Has Product ID::{{{Product ID|}}}]]
 +
|-
 +
! Product Page
 +
| [[Has Product Page::{{{Product Page|}}}]]
 +
{{#if:{{{Datasheet|}}}|
 +
{{!}}-
 +
! Datasheet
 +
{{!}} [[File:{{{Datasheet|}}}]] {{#set:Has Datasheet=File:{{{Datasheet|}}}}}
 +
}}
 +
{{#if:{{{External Datasheet|}}}|
 +
{{!}}-
 +
! External Datasheet
 +
{{!}} [[Has External Datasheet::{{{External Datasheet|}}}]]
 +
}}
 +
{{#if:{{{Price|}}}|
 +
{{!}}-
 +
! Price (USD)
 +
{{!}} [[Has USD Price::{{{Price|}}}]]
 +
}}
 
|}
 
|}
<!-- now some annotations that don't appear in the template -->
+
 
<includeonly> [[Category:Part]] </includeonly>
+
[[Category:Part]]
 +
</includeonly>

Latest revision as of 22:46, 26 August 2021

This is the "Part" template. It should be called in the following format:

{{Part
|Image=
|Modality=
|Part Type=
|Manufacturer=
|Product ID=
|Product Page=
|Datasheet=
|External Datasheet=
|Price=
}}

Edit the page to see the template text.