Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox celestial body: Difference between revisions

Template page
Adding more data
Tag: 2017 source edit
Implementing some template data
Tag: 2017 source edit
Line 1: Line 1:
<noinclude>
<noinclude>
<templatedata>
{
"params": {
"type": {
"label": "CB Type",
"description": "What kind of celestial body is this?",
"example": "Planet",
"type": "string",
"suggestedvalues": [
"Planet",
"Moon",
"Star"
],
"required": true
},
"subtype": {
"label": "CB Subtype",
"description": "What sub-type is this CB? ",
"example": "Terrestrial",
"type": "string",
"suggestedvalues": [
"Terrestrial",
"Gas giant",
"Oceanic",
"Frozen",
"K-type"
],
"required": true
},
"parent": {
"label": "Parent Body",
"description": "What body does this one orbit?",
"example": "Kerbol",
"type": "string",
"suggestedvalues": [
"Kerbol",
"Eve",
"Kerbin",
"Duna",
"Jool"
],
"suggested": true
},
"system": {
"label": "Star System",
"description": "What star system does this CB belong to?",
"example": "Kerbolar",
"type": "string",
"suggestedvalues": [
"Kerbolar",
"Deb Deb"
],
"required": true
},
"radius": {
"label": "Radius",
"description": "The equatorial radius of the body.",
"type": "string",
"required": true
}
}
}
</templatedata>


{{Infobox  
{{Infobox  
Line 15: Line 78:
| label2  = Type
| label2  = Type
|  data2  = #
|  data2  = #
| label3  = Parent body
| label3  = Sub-type
|  data3  = #
|  data3  = #
| label4  = Star system
| label4  = Parent body
|  data4  = #
|  data4  = #
| label5  = Surface
| label5  = Star system
|  data5  = test
|  data5  = #
 


| header20 = Physical Characteristics
| header20 = Physical Characteristics
Line 31: Line 95:
|  data23  = #
|  data23  = #
| label24  = Mass
| label24  = Mass
|  data24 = #
|  data24   = #
| label25  = Axial tilt
| label25  = Axial tilt
|  data25 = #
|  data25   = #


| header40 = Orbital Characteristics
| header40 = Orbital Characteristics
Line 44: Line 108:
|  data43  = #
|  data43  = #
| label44  = Eccentricity
| label44  = Eccentricity
|  data44 = #
|  data44   = #
| label45  = Inclination
| label45  = Inclination
|  data45 = #
|  data45   = #


| header60 = Atmospheric Characteristics
| header60 = Atmospheric Characteristics

Revision as of 03:34, 1 October 2024

<templatedata> { "params": { "type": { "label": "CB Type", "description": "What kind of celestial body is this?", "example": "Planet", "type": "string", "suggestedvalues": [ "Planet", "Moon", "Star" ], "required": true }, "subtype": { "label": "CB Subtype", "description": "What sub-type is this CB? ", "example": "Terrestrial", "type": "string", "suggestedvalues": [ "Terrestrial", "Gas giant", "Oceanic", "Frozen", "K-type" ], "required": true }, "parent": { "label": "Parent Body", "description": "What body does this one orbit?", "example": "Kerbol", "type": "string", "suggestedvalues": [ "Kerbol", "Eve", "Kerbin", "Duna", "Jool" ], "suggested": true }, "system": { "label": "Star System", "description": "What star system does this CB belong to?", "example": "Kerbolar", "type": "string", "suggestedvalues": [ "Kerbolar", "Deb Deb" ], "required": true }, "radius": { "label": "Radius", "description": "The equatorial radius of the body.", "type": "string", "required": true } } } </templatedata>

{{#invoke:Infobox|infobox}}{{#switch:

 {{#if:
 | {{{demospace}}}    
 | {{#ifeq:Template|Template
   | template
   | other
   }}
 }}

| template = {{#ifeq:Infobox celestial body|Infobox||{{#ifeq:Template:Str left|Infobox|[[Category:Infobox templates|Template:Remove first word]]}}}} | other | #default = }}