Difference between revisions of "Template:Grounds"

From DAS Wiki
Line 23: Line 23:
 
Edit the page to see the template text.
 
Edit the page to see the template text.
 
{{#cargo_declare:_table=Grounds|name=Page|alt_name=String|image=File|address=String|geo_reference=List (;) of Coordinates|founder=List (;) of String|owner=String|builder=List (;) of String|area=Float|height=Float|founded=Date|opened=Date|type=List (;) of String|NRHP_ID=String|HRHP_url=URL}}
 
{{#cargo_declare:_table=Grounds|name=Page|alt_name=String|image=File|address=String|geo_reference=List (;) of Coordinates|founder=List (;) of String|owner=String|builder=List (;) of String|area=Float|height=Float|founded=Date|opened=Date|type=List (;) of String|NRHP_ID=String|HRHP_url=URL}}
</noinclude><includeonly>{{#cargo_store:_table=Grounds|name={{{name|}}}|alt_name={{{alt_name|}}}|image={{{image|}}}|geo_reference={{{geo_reference|}}}|founder={{{founder|}}}|owner={{{owner|}}}|builder={{{builder|}}}|area={{{area|}}}|height={{{height|}}}|founded={{{founded|}}}|opened={{{opened|}}}|type={{{type|}}}|NRHP_ID={{{NRHP_ID|}}}|HRHP_url={{{HRHP_url|}}} }}{| class="wikitable"
+
</noinclude><includeonly>{{#cargo_store:_table=Grounds|name={{{name|}}}|alt_name={{{alt_name|}}}|image={{{image|}}}|geo_reference={{{geo_reference|}}}|founder={{{founder|}}}|owner={{{owner|}}}|builder={{{builder|}}}|area={{{area|}}}|height={{{height|}}}|founded={{{founded|}}}|opened={{{opened|}}}|type={{{type|}}}|NRHP_ID={{{NRHP_ID|}}}|HRHP_url={{{HRHP_url|}}} }}{|style="width: 24em; 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;"
! name
+
!style="text-align: center; background-color:#ccccff;" colspan="2" |<span style="font-size: larger;">{{PAGENAME}}</span>
| {{#if:{{{name|}}}|[[{{{name|}}}]]}}
 
 
|-
 
|-
! alternative name
+
! style="text-align: center; margin-left: 0.5em;padding:3px;", colspan="2"| <span>{{#if:{{{image|}}}|[[File:{{{image|}}}|320px|frameless]]</span>}}
| {{{alt_name|}}}
+
|-<!-- all the arrows at the end and beginning of the lines below serve to eliminate carriage returns/line feeds from the published infobox. Otherwise, small amounts of vertical white space appear when no output is desired (i.e. when there is no entry for that particular category).-->
|-
+
<!--Site Information
! image
+
-->{{#if:{{{alt_name|}}}{{{address|}}}{{{geo_reference|}}}{{{height|}}}{{{acreage|}}}{{{type|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">Site Information</th></tr>}}<!--
| {{#if:{{{image|}}}|[[File:{{{image|}}}]]}}
+
-->{{#if:{{{alt_name|}}}|<tr><th>Other Name</th><td>{{{alt_name|}}}</td></tr>}}<!--
|-
+
-->{{#if:{{{address|}}}|<tr><th>Address</th><td>[[{{{address|}}}]]</td></tr>}}<!--
! address
+
-->{{#if:{{{Geo|}}}|<tr><th>Geo-reference</th><td>{{coord|{{#explode:{{{Geo|}}}|,|0}}|{{#explode:{{{Geo|}}}|,|1}}|format=dms}}</td></tr>}}<!--Apparently the Cargo record fetch doesn't retrieve the individual latitude and longitude values, but fetches a string containing both. So I had to explode that value (Geo) into the two components, and feed each one of them to the coord routine. See documentation on explode and coord.
|{{{address|}}}
+
-->{{#if:{{{height|}}}|<tr><th>Height above Sea-level</th><td>{{{height|}}}</td></tr>}}<!--
|-
+
-->{{#if:{{{acreage|}}}|<tr><th>Acreage</th><td>{{{acreage|}}}</td></tr>}}<!--
! geo-reference
+
-->{{#if:{{{type|}}}|<tr><th>Type of facility</th><td>{{{type}}}</td></tr>}}<!--
| {{#cargo_display_map:point= {{{geo_reference|}}} }}
+
-->{{#if:{{{founder|}}}{{{owner|}}}{{{builder|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">People</th></tr>}}<!--
|-
+
-->{{#if:{{{founder|}}}|<tr><th>Founder</th><td>{{{founder|}}}</td></tr>}}<!--
! founder(s)
+
-->{{#if:{{{owner|}}}|<tr><th>Owner</th><td>{{{owner|}}}</td></tr>}}<!--
| {{{founder|}}}
+
-->{{#if:{{{builder|}}}|<tr><th>Builder</th><td>{{{builder|}}}</td></tr>}}<!--
|-
+
-->{{#if:{{{founded|}}}{{{opened|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">Dates</th></tr>}}<!--
! owner
+
-->{{#if:{{{founded|}}}|<tr><th>Founded</th><td>{{{founded|}}}</td></tr>}}<!--
| {{{owner|}}}
+
-->{{#if:{{{opened|}}}|<tr><th>Opened to Public</th><td>{{{opened|}}}</td></tr>}}<!--
|-
+
<!--
! builder
+
National Register
| {{{builder|}}}
+
-->{{#if:{{{NRHP_ID|}}}{{{NRHP_url|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">National Register of Historic Places</th></tr>}}<!--
|-
+
-->{{#if:{{{NRHP_ID|}}}|<tr><th>ID Number</th><td>[{{{NRHP_url}}} {{{NRHP_ID}}}]</td></tr>}}
! acreage
 
| {{{area|}}}
 
|-
 
! height above sea-level
 
| {{{height|}}}
 
|-
 
! founding date
 
| {{{founded|}}}
 
|-
 
! opened to public
 
| {{{opened|}}}
 
|-
 
! type(s) of facility
 
| {{{type|}}}
 
|-
 
! NRHP Number
 
| {{{NRHP_ID|}}}
 
|-
 
! NRHP website
 
| {{{HRHP_url|}}}
 
 
|}
 
|}
 +
[[Category:Grounds]]
 
</includeonly>
 
</includeonly>

Revision as of 18:49, June 13, 2021

This is the "Grounds" template. It should be called in the following format:

{{Grounds
|name=
|alt_name=
|image=
|address=
|geo_reference=
|founder=
|owner=
|builder=
|area=
|height=
|founded=
|opened=
|type=
|NRHP_ID=
|HRHP_url=
}}

Edit the page to see the template text. This template defines the table "Grounds". View table.