Difference between revisions of "Template:Part"

From Autopilot Wiki
Jump to: navigation, search
(Generated from a page schema)
Line 1: Line 1:
<noinclude>Individual, off-the-shelf components
+
<noinclude>
 
+
This is the "Part" template.
'''Syntax:'''
+
It should be called in the following format:
 
 
 
<pre>
 
<pre>
{{ Part
+
{{Part
| modality =  
+
|Image=
| manufacturer =
+
|Modality=
| interface =  
+
|Part Type=
| link =  
+
|Manufacturer=
| datasheet =  
+
|Product ID=
|}}
+
|Product Page=
 +
|Datasheet=
 +
|Price=
 +
}}
 
</pre>
 
</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>
 +
|-
 +
{{#if:{{{Image|}}}|! Image
 +
{{!}} [[File:{{{Image|}}}]] {{#set:Has Image=File:{{{Image|}}}}}
 +
}}
 +
|-
 +
! Modality
 +
| {{#arraymap:{{{Modality|}}}|,|x|[[Modality::x]]}}
  
</noinclude>
 
{| style="border: 1px solid; width:25em; float: right; font-size: 90%; padding: 1rem; margin: 1rem;"
 
 
|-
 
|-
|colspan="2" style="text-align: center;"| '''{{PAGENAME}}'''
+
! Part Type
 +
| [[Is Part Type::{{{Part Type|}}}]]
 
|-
 
|-
! [[Property:Modality | Modality]]
+
! Manufacturer
| [[Modality::{{{modality}}}]]
+
| [[Manufactured By::{{{Manufacturer|}}}]]
 
|-
 
|-
! [[Property:Manufactured By | Manufacturer]]
+
! Product ID/Part Number
| [[Manufactured By::{{{manufacturer}}} ]]
+
| [[Has Product ID::{{{Product ID|}}}]]
 
|-
 
|-
! [[Property:Has Interface | Interface]]
+
! Product Page
| [[Has Interface::{{{interface}}} ]]
+
| [[Has Product Page::{{{Product Page|}}}]]
 
|-
 
|-
! [[Property:Purchase Link | Purchase Link]]
+
! Datasheet
| [[Purchase Link::{{{link|n/a}}}]]
+
| [[Has Datasheet::{{{Datasheet|}}}]]
|-
+
{{#if:{{{Price|}}}|
! [[Property:Datasheet | Datasheet]]
+
{{!}}-
| [[Datasheet::{{{datasheet|n/a}}}]]
+
! Price (USD)
 +
{{!}} [[Has USD Price::{{{Price|}}}]]
 +
}}
 
|}
 
|}
<!-- now some annotations that don't appear in the template -->
+
 
<includeonly> [[Category:Part]] [[Category:Hardware]]  </includeonly>
+
[[Category:Part]]
 +
</includeonly>

Revision as of 00:51, 2 July 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=
|Price=
}}

Edit the page to see the template text.