Difference between revisions of "Template:Infobox pyramid/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Mike Peel
(fix)
imported>Francis Schonken
(need Wikidata-free version)
 
Line 1: Line 1:
 
{{Infobox
 
{{Infobox
| bodyclass = vcard
+
| bodyclass   = vcard
| aboveclass = fn org
+
| aboveclass = fn org
| child    = {{{child|}}}
+
| above       = {{{name|{{{Name}}}}}}
| above     = <includeonly>{{{name|{{{Name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{PAGENAMEBASE}}}}}}}}}}</includeonly>
 
  
| image     = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:WikidataIB |getPreferredValue |P18 |name=image |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced=no |noicon=yes|{{{image|{{{Image|}}}}}}}}|size={{{image size|{{{image_size|{{{imagesize|}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|{{{image_alt|}}}}}}|suppressplaceholder=yes}}
+
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{Image|}}}}}}|size={{{image_size|}}}|sizedefault=frameless|alt={{{alt|}}}}}
| caption   = {{#if:{{{image|}}}|{{{caption|{{{Caption|}}}}}}|{{{caption|{{{Caption|{{#invoke:Wikidata|getImageLegend|FETCH_WIKIDATA}}}}}}}}}}
+
| caption = {{{caption|{{{Caption|}}}}}}
  
| label1  = Owner
+
| header1 = {{{owner|{{{Owner|}}}}}}
| data1  = {{If first display both|{{#invoke:WikidataIB|getPreferredValue|P127|qid={{{qid|}}}|name=architect|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|sep="<br />"|sorted=yes|{{{owner|{{{Owner|}}}}}} }}|{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P127}}}}}}
 
  
| label2 = Location
+
| image2 = {{{map|}}}
| data2  = {{Wikidata location}}
+
| caption2 = {{{map_caption|}}}
  
| label3 = Coordinates
+
| image3 = {{#if: {{{map_type|}}}|{{Location map|{{{map_type|}}}
| data3  = {{#if:{{{coords|}}}{{{Coords|}}}{{{coordinates|}}} | {{ifempty|{{{coordinates|}}}|{{{coords|{{{Coords|}}}}}}}} | {{#if:{{#Property:P625}} | {{Coord|nosave=1|display=inline,title|format=dms|type:landmark}} }} }}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}
+
|relief  = {{{relief|}}}
 +
  |alt    = {{{map_alt|}}}
 +
|coordinates = {{{coordinates|{{{coords|{{{Coords|}}}}}}}}}
 +
|float  = center
 +
|mark    = Gfi-set01-pyramide.png
 +
|label  = {{{map dot label|{{{map_dot_label|}}}}}}
 +
|border  = infobox
 +
|caption = {{#if:{{{map_caption}}}|{{{map_caption|Location within {{{map_type}}}}}}}}
 +
|width  = {{#if:{{{map_size|}}}|{{{map_size}}}|220}}
 +
}}}}
  
| label4 = Ancient name
+
| label2 = Coordinates
| class4 = nickname
+
| data2 = {{#if:{{{coordinates|{{{coords|{{{Coords|}}}}}}}}}|{{#invoke:Coordinates|coordinsert|{{{coordinates|{{{coords|{{{Coords}}}}}}}}}|type:landmark}}}}
| data4  = {{{ancient|{{{Ancient|}}}}}}
 
  
| label5 = Architect
+
| label3 = Ancient name
| data5  = {{If first display both|{{#invoke:WikidataIB|getPreferredValue|P84|qid={{{qid|}}}|name=architect|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|sep="<br />"|sorted=yes|{{{architect|{{{Architect|}}}}}} }}|{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P84}}}}}}
+
| class3 = nickname
 +
| data3 = {{{ancient|{{{Ancient|}}}}}}
  
| label6 = Constructed
+
| label4 = Architect
| data6  = {{#if:{{#invoke:WikidataIB|checkBlacklist|name=date|suppressfields={{{suppressfields|}}}}}|{{#if:{{{date|{{{Date|{{#Property:P571|from={{{qid|}}}}}}}}}}}|{{{date|{{{Date|{{#ifeq:{{#invoke:wd|qualifier|P571|P1480}}|circa|{{circa}}|}}{{wikidata|property|{{{qid|}}}|P571}}}}}|{{{completion_date|}}}}}}}}}}
+
| data4 = {{{architect|{{{Architect|}}}}}}
  
| label7 = Type
 
| class7 = category
 
| data7  = {{{type|{{{Type|}}}}}}
 
  
| label8 = Material
+
| label5 = Constructed
| class8 = category
+
| data5 = {{{date|{{{Date|}}}}}}
| data8  = {{If first display both|{{#invoke:WikidataIB|getPreferredValue|P186|qid={{{qid|}}}|name=material|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|sep="<br />"|sorted=yes|{{{material|{{{Material|}}}}}} }}|{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P186}}}}}}
 
  
| label9 = Height
+
| label6 = Type
| data9  = {{{height|{{{Height|{{#if:{{#Property:P2048|from={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2048|qid={{{qid|}}}|FETCH_WIKIDATA}}|inch|{{convert|input=P2048|cm|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2048|qid={{{qid|}}}|FETCH_WIKIDATA}}|foot|{{convert|input=P2048|m|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2048|qid={{{qid|}}}|FETCH_WIKIDATA}}|metre|{{convert|input=P2048|ft|abbr=on|qid={{{qid|}}}}}|{{convert|input=P2048|in|abbr=on|qid={{{qid|}}}}} }} }} }}{{wikidata|references|normal+|{{{qid|}}}|P2048}} }} }}}}}}
+
| class6 = category
 +
| data6 = {{{type|{{{Type|}}}}}}
  
| label10 = Base
+
| label7 = Material
| data10  = {{{base|{{{Base|{{#if:{{#Property:P2049|from={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2049|qid={{{qid|}}}|FETCH_WIKIDATA}}|inch|{{convert|input=P2049|cm|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2049|qid={{{qid|}}}|FETCH_WIKIDATA}}|foot|{{convert|input=P2049|m|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2049|qid={{{qid|}}}|FETCH_WIKIDATA}}|metre|{{convert|input=P2049|ft|abbr=on|qid={{{qid|}}}}}|{{convert|input=P2049|in|abbr=on|qid={{{qid|}}}}} }} }} }}{{wikidata|references|normal+|{{{qid|}}}|P2049}} }} }}}}}}
+
| class7 = category
 
+
| data7 = {{{material|{{{Material|}}}}}}
| label11 = Volume
 
| data11  = {{{volume|{{{Volume|{{#if:{{#Property:P2234|from={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2234|qid={{{qid|}}}|FETCH_WIKIDATA}}|cuinch|{{convert|input=P2234|sqcm|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2234|qid={{{qid|}}}|FETCH_WIKIDATA}}|sqfoot|{{convert|input=P2234|cum|abbr=on|qid={{{qid|}}}}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2234|qid={{{qid|}}}|FETCH_WIKIDATA}}|cumetre|{{convert|input=P2234|cuft|abbr=on|qid={{{qid|}}}}}|{{convert|input=P2234|cuyd|abbr=on|qid={{{qid|}}}}} }} }} }}{{wikidata|references|normal+|{{{qid|}}}|P2234}} }} }}}}}}
 
  
| label12 = Slope
+
| label8 = Height
| data12  = {{{slope|{{{Slope|{{#Property:P2198|from={{{qid|}}}}}}}}}}}
+
| data8 = {{{height|{{{Height|}}}}}}
  
| data13  = {{#if:{{#Property:P757|from={{{qid|}}}}}|{{Infobox World Heritage Site|child=yes|noicon=false}}}}{{{embedded|}}}
+
| label9 = Base
 +
| data9 = {{{base|{{{Base|}}}}}}
  
| data14    = {{{map|}}}{{#if:{{{map_caption|}}}|<br />{{{map_caption|}}}}}
+
| label10 = Volume
 
+
| data10 = {{{volume|{{{Volume|}}}}}}
| data15 = {{#if: {{{map_type|}}}|{{Location map|{{{map_type|}}}
 
|relief  = {{{relief|}}}
 
|alt    = {{{map_alt|}}}
 
|coordinates = {{{coordinates|{{{coords|{{{Coords|}}}}}}}}}
 
|float  = center
 
|mark    = Gfi-set01-pyramide.png
 
|label  = {{{map dot label|{{{map_dot_label|}}}}}}
 
|border  = infobox
 
|caption = {{#if:{{{map_caption}}}|{{{map_caption|Location within {{{map_type}}}}}}}}
 
|width  = {{#if:{{{map_size|}}}|{{{map_size}}}|220}}
 
}}|{{Wikidata location map}}}}
 
  
| data16 = <div style="text-align: center;">{{#if:{{#invoke:Wikidata|getValue|P373|{{{commons|FETCH_WIKIDATA}}} }} | {{icon|Commons}} [[Commons:{{#if:{{{commons|}}} | {{{commons}}} | Category:{{#invoke:Wikidata|getValue|P373|FETCH_WIKIDATA}} }} |Related media on Wikimedia Commons]]}}</div>
+
| label11 = Slope
 +
| data11 = {{{slope|{{{Slope|}}}}}}
  
| below    = <includeonly>{{EditOnWikidata}}</includeonly>
+
| data12 = {{{embedded|}}}
  
}}<includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox pyramid with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox pyramid]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | Ancient | ancient | Architect | architect | Base | base | Caption | caption | child | coordinates | Coords | coords | Date | date | embedded | fetchwikidata | Height | height | Image | image | image_alt | image size | image_size | image_upright | imagesize | map | map dot label | map_alt | map_caption | map_caption | map_dot_label | map_size | map_type | Material | material | Name | name | Owner | owner | qid | refs | relief | Slope | slope | suppressfields | type | Type | Volume | volume
+
}}<noinclude>{{documentation}}</noinclude>
}}{{main other|{{#if:{{safesubst:#invoke:Check for unknown parameters|check|unknown=1|preview=1|child|nocoord|noicon|nomap|locmapin}}|[[Category:Articles using infobox pyramid using locally defined parameters]]|{{#if:{{{child|}}}||[[Category:Articles with infoboxes completely from Wikidata]]}}}}}}</includeonly><noinclude>{{documentation}}<!--Please add any categories to the /doc page --></noinclude>
 

Latest revision as of 14:43, 21 May 2018

{{{Name}}}
Template documentation[view] [edit] [history] [purge]

{{Infobox pyramid}} is the standard infobox for Egyptian pyramid articles, and can be used for other such structures.

All parameters except |name= are optional.

Usage

  1. redirect Template:Parameter names example
{{Infobox pyramid
| name        = 
| image       = 
| image_size  = 
| alt         = 
| caption     = 
| map_type    = 
| relief      = 
| map_size    = 
| map_alt     = 
| map_caption = 
| map_dot_label = 
| owner       = 
| coordinates = 
| ancient     = 
| date        = 
| type        = 
| material    = 
| height      = 
| base        = 
| volume      = 
| slope       = 
}}

Parameters

The full list of parameters is:

Parameter Default Description
name Page name Name of the pyramid
image FileName.Extension (e.g., Chichen Itza 3.jpg)
image_size Size of the image (usually 250 to 300 pixels)
alt Alternative text
caption Caption for the image
map_type The name of a {{location map}}; typically the country name (e.g., Mexico)
relief yes / no
map_size Size of the map (in pixels)
map_alt Alternative caption of the map
map_caption Caption of the map
map_dot_label ?
owner The owner of the pyramid, e.g. "Khufu"
architect The architect of the pyramid (if known)
coordinates The coordinates; use {{coord}} with |display=inline,title
ancient The ancient name, e.g. "Khufu's Horizon"
date The building time, see also Egyptian pyramids#Construction dates
type The type of the pyramid, e.g. "true pyramid"
material The building material
height The height; use {{convert}}
base The extent of the base; use {{convert}}
volume The pyramid's volume; use {{convert}}
slope The angular degree of the slope (e.g., 37°29'44")
child no Set to 'yes' if this is embedded in another template
embedded Use this parameter to use an embedded infobox in this one.

Example

Great Pyramid of Giza
Kheops-Pyramid.jpg
Khufu
CoordinatesLua error: callParserFunction: function "#coordinates" was not found.
Ancient nameKhufu's Horizon
Constructedc. 2560–2540 BC
TypeTrue Pyramid
Height146.5 m (481 ft), ancient
138.8 m (455 ft), contemporary
Base230.4 m (756 ft)
Lua error in Module:Location_map at line 399: Malformed coordinates value.
{{Infobox pyramid
| name        = Great Pyramid of Giza
| image       = Kheops-Pyramid.jpg
| image_size  = 250
| map_type    = Egypt
| relief      = yes
| map_size    = 250
| map_caption = Location of pyramid in [[Egypt]]
| owner       = [[Khufu]]
| coordinates = {{coord|29|58|45|N|31|8|4|E|region:EG_type:landmark|display=inline}}
| ancient     = Khufu's Horizon
| date        = c. 2560–2540 BC
| type        = [[Pyramid|True Pyramid]]
| height      = {{convert|146.5|m|ft|0|abbr=on}}, ''ancient'' <br/>{{convert|138.8|m|ft|0|abbr=on}}, ''contemporary''
| base        = {{convert|230.4|m|ft|0|abbr=on}}
}}

Microformat

Template:UF-hcard-geo

Tracking category

See also