Template:Infobox lighthouse
{{#ifeq:{{{embed}}}|yes||{{main other|{{short description|Lighthouse|2=noreplace}}}}
}}{{Infobox
| child = {{#ifeq:{{{embed}}}|yes|yes}}
| bodyclass = vcard
| titleclass = fn
| autoheaders = y
| subheaderstyle = background:#bfbfbf; font-weight:bold;
| {{#ifeq:{{{embed}}}|yes|subheader|title}} = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{PAGENAMEBASE}}}}{{#if:{{#invoke:WikidataIB |getValue|rank=best|P1705|noicon=true|name=name|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|prefix=
}}
|{{#invoke:WikidataIB |getValue|rank=best|P1705|noicon=true|name=name|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|prefix=
}}
|{{#invoke:WikidataIB |getValue|rank=best|P1448|noicon=true|name=name|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|prefix=
}}
}}}}}{{#ifeq:{{{embed}}}|yes| {{EditAtWikidata|qid={{{qid|}}}}}}} [[File:Commons to Wikidata QuickStatements.svg|20px|link=https://quickstatements.toolforge.org/#/v1={{Get QID|qid={{{qid|}}}}}%7CP31%7CQ39715{{#if:{{{coordinates|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP625%7C@{{urlencode:{{#invoke:coordinates|coord2text|{{{coordinates}}}|lat}}/{{#invoke:coordinates|coord2text|{{{coordinates}}}|long}}}}%7CS143%7CQ328
}}{{#if:{{{grid_ref_UK|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP613%7C{{urlencode:"{{{grid_ref_UK}}}"|WIKI}}%7CS143%7CQ328
}}{{#if:{{{yearbuilt|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP571%7C{{urlencode:+{{Str left|{{{yearbuilt}}}|{{str number|{{{yearbuilt}}}}}}}-00-00T00:00:00Z/9}}%7CS143%7CQ328
}}{{#if:{{{yearlit|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP729%7C{{urlencode:+{{Str left|{{{yearlit}}}|{{str number|{{{yearlit}}}}}}}-00-00T00:00:00Z/9}}%7CS143%7CQ328
}}{{#if:{{{yeardeactivated|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP730%7C{{urlencode:+{{Str left|{{{yeardeactivated}}}|{{str number|{{{yeardeactivated}}}}}}}-00-00T00:00:00Z/9}}%7CS143%7CQ328
}}{{#if:{{{automated|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP793%7CQ24410992%7CP585%7C{{urlencode:+{{Str left|{{{automated}}}|{{str number|{{{automated}}}}}}}-00-00T00:00:00Z/9}}%7CS143%7CQ328
}}{{#if:{{{height|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP2048%7C{{first word|{{{height}}}|{{str number|{{{height}}}}}}}U11573%7CS143%7CQ328
}}{{#if:{{{focalheight|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP2923%7C{{first word|{{{focalheight}}}|{{str number|{{{focalheight}}}}}}}U11573%7CS143%7CQ328
}}{{#if:{{{intensity|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP3041%7C{{first word|{{{intensity}}}|{{str number|{{{intensity}}}}}}}U83216%7CS143%7CQ328
}}{{#if:{{{range|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP2929%7C{{first word|{{{range}}}|{{str number|{{{range}}}}}}}U93318%7CS143%7CQ328
}}{{#if:{{{characteristic|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP1030%7C{{urlencode:"{{{characteristic}}}"|PATH}}%7CS143%7CQ328
}}{{#if:{{{racon|}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP3994%7C{{urlencode:"{{first word|{{{racon}}}}}"|PATH}}%7CS143%7CQ328
}}{{#if:{{{image|{{{image_name|}}}}}}
|%7C%7C{{Get QID|qid={{{qid|}}}}}%7CP18%7C{{urlencode:"{{{image|{{{image_name}}}}}}"|PATH}}%7CS143%7CQ328{{#if:{{{caption|}}}
|%7CP2096%7C{{urlencode:en:"{{{caption}}}"|PATH}}
}}
}}]]
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:WikidataIB |getValue|maxvals=1|P18|name=image|qid={{{qid|}}}|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced=no|noicon=yes|{{{image|{{{image_name|}}}}}}}}|size={{{image_width|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}}
| caption = {{#if:{{{image|}}}|{{{caption|}}}|{{{caption|{{#invoke:Wikidata|getImageLegend|id={{{qid|}}}|FETCH_WIKIDATA}}}}}}}
| image3 = {{yesno|{{{mapframe|{{#ifeq:{{{embed}}}|yes|no|yes}}}}}|no=|yes={{Infobox mapframe
|id={{{qid|}}}
|zoom={{{mapframe-zoom|5}}}
|frame-width={{{mapframe-width|}}}
|frame-height={{{mapframe-height|}}}
|marker={{{mapframe-marker|lighthouse}}}
|marker-color={{{mapframe-marker-color|{{{mapframe-marker-colour|}}}}}}
|coord={{{coordinates|}}}
|frame-lat={{{mapframe-lat|{{{mapframe-latitude|}}}}}}
|frame-long={{{mapframe-long|{{{mapframe-longitude|}}}}}}
}}
}}
| caption3 = {{yesno|{{{mapframe|yes}}}|no=|yes={{{mapframe-caption|}}}}}
| label1 = Location
| class1 = label
| data1 = {{#ifeq:{{{embed}}}|yes||{{Wikidata location|suppressfields={{{suppressfields|{{#ifeq:{{{embed}}}|yes|location}}}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|location={{{location|}}}|refs={{{refs|no}}}|qid={{{qid|}}}}}}}
| label2 = OS grid
| data2 = {{gbmappingsmall|{{#invoke:WikidataIB|getValue|P613|qid={{{qid|}}}|noicon=true|name=os_grid_reference|fetchwikidata={{{fetchwikidata|{{#ifeq:{{{embed}}}|yes||ALL}}}}}|onlysourced={{{onlysourced|no}}}|{{{grid_ref_UK|}}}}}}}
| label3 = Coordinates
| data3 = {{#invoke:WikidataIB|getCoords|qid={{{qid|}}}|name=coordinates|fetchwikidata={{{fetchwikidata|{{#ifeq:{{{embed}}}|yes||ALL}}}}}|format={{{coord_format|}}}|{{{coordinates|}}}}}
|rowstyle4 = background:#b9deed;
|header4 = {{#ifeq:{{{embed}}}|yes||{{#ifexpr:{{#invoke:Is instance|main|qid={{{qid|}}}|value=Q39715}}>0|Tower}}}}
| label5 = Constructed
| data5 = {{#invoke:WikidataIB |getValue|rank=best|P571|name=constructed|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{yearbuilt|}}}}}
| label6 = Designed by
| data6 = {{#invoke:WikidataIB|getValue|P287|name=designer|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
| label7 = Built by
| data7 = {{comma separated entries
|2={{#invoke:WikidataIB |getValue|P193|name=builder|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
|3={{#invoke:WikidataIB |getValue|P631|name=builder|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
}}
| label11 = Foundation
| data11 = {{{foundation|}}}
| label12 = Construction
| data12 = {{#invoke:WikidataIB |getValue|P186|qual=P518|linked=no|name=construction|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{construction|}}}}}
| label13 = Automated
| data13 = {{#invoke:WikidataIB |getQualifierValue |P793 |pval=Q24410992 |qual=P585 |name=automated |suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{automated|}}} }}
| label14 = Height
| data14 = {{#invoke:WikidataIB |getValue|rank=best|P2048|name=height|convert=yes|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{height|}}}}}
| label15 = Shape
| data15 = {{#invoke:WikidataIB |getValue|linked=no|P1419|qual=P518|name=shape|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{shape|}}}}}
| label16 = Markings
| class16 = note
| data16 = {{#if:{{{marking|}}}
|{{{marking|}}}
|{{comma separated entries
|1={{#invoke:WikidataIB|getValue|linked=no|P462|qual=P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
|2={{#invoke:WikidataIB|getValue|linked=no|P5422|qual=P1419, P1114, P462, P7469, P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
}}
}}
| label17 = Power source
| data17 = {{#invoke:WikidataIB|getValue|linked=no|P618|name=powersource|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
| label18 = Operator
| data18 = {{#invoke:WikidataIB |getValue|rank=best|P137|qual=DATES|name=managingagent|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{managingagent|}}}}}
| label19 = Heritage
| data19 = {{#invoke:WikidataIB |getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{heritage|}}}}}
| label20 = Fog signal
| data20 = {{{fogsignal|}}}
| label21 = Racon
| data21 = {{#invoke:WikidataIB |getValue|rank=best|P3994|name=racon|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{racon|}}}}}
| header25= _BLANK_
| rowstyle26 = display:none
| data26 = {{Infobox lighthouse/light
| qid = {{{qid|}}}
| suppressfields = {{{suppressfields|}}}
| fetchwikidata = {{{fetchwikidata|ALL}}}
| name = {{#ifeq:{{{embed}}}|yes||Light}}
| onlysourced = {{{onlysourced|no}}}
| yearlit = {{{yearlit|}}}
| yeardeactivated = {{{yeardeactivated|}}}
| focalheight = {{{focalheight|}}}
| lens = {{{lens|}}}
| lightsource = {{{lightsource|}}}
| intensity = {{{intensity|}}}
| range = {{{range|}}}
| characteristic = {{{characteristic|}}}
| USCG = {{{USCG|}}}
| country = {{{country|}}}
| countrylink = {{{countrylink|}}}
| countrynumber = {{{countrynumber|}}}
}}
| data28 = {{{light1|}}}
| data29 = {{{light2|}}}
| header40= _BLANK_
| data41 = {{{module|}}}
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|_VALUE_{{PAGENAME}}}}|preview=Page using Template:Infobox lighthouse with unknown parameter "_VALUE_"|ignoreblank=y| alt | automated | caption | characteristic | construction | coordinates | country | countrylink | countrynumber | designation | embed | fetchwikidata | focalheight | fogsignal | foundation | grid_ref_UK | height | heritage | image | image size | image | image_name | image_size | image_upright | image_width | imagesize | intensity | lens | light1 | light2 | lightsource | location | managingagent | map_caption | mapframe | mapframe-caption | mapframe-height | mapframe-lat | mapframe-latitude | mapframe-long | mapframe-longitude | mapframe-marker | mapframe-marker-color | mapframe-marker-colour | mapframe-width | mapframe-zoom | marking | module | name | onlysourced | qid | qs | racon | range | refs | shape | suppressfields | yearbuilt | yeardeactivated | yearlit
}}{{#if:{{{image_name|}}}|Category:Pages using infobox lighthouse with deprecated parameters}}{{#if:{{{countrynumber|}}}
|{{#switch:{{lc:{{{country}}}}}
|italy = {{WikidataCheck|property=P3863|qid={{{qid|}}}|value={{First word|{{{countrynumber|}}}}}|category=Elenco Fari}}
|norway = {{WikidataCheck|property=P4055|qid={{{qid|}}}|value={{First word|{{{countrynumber|}}}}}|category=Norsk fyrliste}}
|#default = Category:Pages using infobox lighthouse with custom country number
}}
}}{{#if:{{{qid|}}}|Category:Pages using infobox lighthouse with custom Wikidata item}}{{main other|{{#invoke:lighthouse tracking|tracking|heritage={{#invoke:WikidataIB|getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|linked=no|noicon=yes|{{{heritage|}}}}}}}}}{{main other|Category:All articles using infobox lighthouse{{#ifexpr:{{#invoke:Is instance|main|qid={{{qid|}}}|value=Q7321258}}||Category:Pages using infobox lighthouse which are not lighthouses}}}}
{{documentation}}