Jump to content

Template:Place: Difference between revisions

From Costa Sano MediaWiki
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
Place data template
Place data template
Defines the Cargo schema for Places.
One page = one Place.
Page title (PAGENAME) is the identifier (Code).
</noinclude>
{{#cargo_declare:
{{#cargo_declare:
  _table=Places
  |table=Places
  |title=String
  |fields=
|code=Page
  Code=Page,
|parent=Page
  Parent=Page,
|type=String
  Label=String,
|address=String
  Type=String,
|latitude=Float
  Address=String,
|longitude=Float
  Latitude=Float,
|notes=Text
  Longitude=Float,
  Notes=Text
}}
}}
</noinclude>


{{#cargo_store:
{{#cargo_store:
  title={{{title|}}}
  |Code=PAGENAME
  |code={{PAGENAME}}
  |Parent={{{Parent|}}}
  |parent={{{parent|}}}
  |Label={{{Label|}}}
  |type={{{type|}}}
  |Type={{{Type|}}}
  |address={{{address|}}}
  |Address={{{Address|}}}
  |latitude={{{latitude|}}}
  |Latitude={{{Latitude|}}}
  |longitude={{{longitude|}}}
  |Longitude={{{Longitude|}}}
  |notes={{{notes|}}}
  |Notes={{{Notes|}}}
}}
}}


== {{{title|}}} ==
== {{{Label|}}} ==
{{DISPLAYTITLE:{{{Label}}}}}


{{DISPLAYTITLE:{{{title}}}}}
{{#if:{{{Parent|}}}|
 
'''Parent place:''' [[{{{Parent}}}]]
{{#if:{{{parent|}}}|Parent place: [[{{{parent}}}]]}}
}}


'''Notes:'''
'''Notes:'''
{{{notes|}}}
{{{Notes|}}}


'''Map:'''
{{#if:{{{Latitude}}}{{{Longitude}}}|
{{#if:{{{latitude}}}{{{longitude}}}|
'''Map:''' 
[https://www.openstreetmap.org/?mlat={{{latitude}}}&mlon={{{longitude}}} View on OpenStreetMap]
[https://www.openstreetmap.org/?mlat={{{Latitude}}}&mlon={{{Longitude}}} View on OpenStreetMap]
}}
}}

Revision as of 13:26, 16 February 2026

Place data template Defines the Cargo schema for Places. One page = one Place. Page title (PAGENAME) is the identifier (Code).


Error: "table" cannot be used as a Cargo Field name, because it is an SQL keyword.


Notes:


Map: View on OpenStreetMap