Difference between revisions of "Template:Grounds"

From DAS Wiki
 
(24 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
|image=
 
|image=
 
|address=
 
|address=
|geo_reference=
+
|perimeter=
 +
|Geo=
 
|founder=
 
|founder=
 
|owner=
 
|owner=
Line 14: Line 15:
 
|other_designers=
 
|other_designers=
 
|builder=
 
|builder=
|area=
+
|acreage=
|height=
+
|elevation=
 
|founded=
 
|founded=
 +
|founded_approx=
 
|opened=
 
|opened=
 +
|opened_approx=
 
|type=
 
|type=
 
|NRHP_ID=
 
|NRHP_ID=
Line 24: Line 27:
 
</pre>
 
</pre>
 
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
</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;"
+
|alt_name=String
 +
|image=File
 +
|address=String
 +
|perimeter=Text
 +
|Geo=Coordinates
 +
|founder=List (;) of String
 +
|owner=String
 +
|builder=List (;) of String
 +
|landscape_architect=Page
 +
|other_designers=List (;) of Page
 +
|acreage=Float
 +
|elevation=Float
 +
|founded=Date
 +
|founded_approx=Boolean
 +
|opened=Date
 +
|opened_approx=Boolean
 +
|type=List (;) of String
 +
|NRHP_ID=String
 +
|NRHP_url=URL
 +
}}
 +
</noinclude><includeonly>__NOCACHE__{{#default_form:Grounds}}{{#cargo_store:_table=Grounds
 +
|alt_name={{{alt_name|}}}
 +
|image={{{image|}}}
 +
|address={{{address|}}}
 +
|perimeter={{{perimeter|}}}
 +
|Geo={{{Geo|}}}
 +
|founder={{{founder|}}}
 +
|owner={{{owner|}}}
 +
|builder={{{builder|}}}
 +
|landscape_architect={{{landscape_architect|}}}
 +
|other_designers={{{other_designers|}}}
 +
|acreage={{{acreage|}}}
 +
|elevation={{{elevation|}}}
 +
|founded={{{founded|}}}
 +
|founded_approx={{{founded_approx|}}}
 +
|opened={{{opened|}}}
 +
|opened_approx={{{opened_approx|}}}
 +
|type={{{type|}}}
 +
|NRHP_ID={{{NRHP_ID|}}}
 +
|NRHP_url={{{NRHP_url|}}}
 +
}}
 +
{| class="infobox"
 
!style="text-align: center; background-color:#ccccff;" colspan="2" |<span style="font-size: larger;">{{PAGENAME}}</span>
 
!style="text-align: center; background-color:#ccccff;" colspan="2" |<span style="font-size: larger;">{{PAGENAME}}</span>
 
|-
 
|-
Line 31: Line 75:
 
|-<!-- 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).-->
 
|-<!-- 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
 
<!--Site Information
-->{{#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:{{{alt_name|}}}{{{address|}}}{{{Geo|}}}{{{elevation|}}}{{{acreage|}}}{{{type|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">Site Information</th></tr>}}<!--
 
-->{{#if:{{{alt_name|}}}|<tr><th>Other Name</th><td>{{{alt_name|}}}</td></tr>}}<!--
 
-->{{#if:{{{alt_name|}}}|<tr><th>Other Name</th><td>{{{alt_name|}}}</td></tr>}}<!--
 
-->{{#if:{{{address|}}}|<tr><th>Address</th><td>{{{address|}}}</td></tr>}}<!--
 
-->{{#if:{{{address|}}}|<tr><th>Address</th><td>{{{address|}}}</td></tr>}}<!--
-->{{#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.
+
-->{{#if:{{{perimeter|}}}|<tr><th colspan="2">{{#display_map:|{{{perimeter}}}~ ~ ~#3B3BF5~ ~ ~#68A1E6|width=320|height=250 }}</th></tr> }}<!--
-->{{#if:{{{height|}}}|<tr><th>Height above Sea-level</th><td>{{{height|}}}</td></tr>}}<!--
+
-->{{#if:{{{elevation|}}}|<tr><th>Above Sea-level (ft)</th><td>{{{elevation|}}}</td></tr>}}<!--
 
-->{{#if:{{{acreage|}}}|<tr><th>Acreage</th><td>{{{acreage|}}}</td></tr>}}<!--
 
-->{{#if:{{{acreage|}}}|<tr><th>Acreage</th><td>{{{acreage|}}}</td></tr>}}<!--
-->{{#if:{{{type|}}}|<tr><th>Type of facility</th><td>{{{type}}}</td></tr>}}<!--
+
-->{{#if:{{{type|}}}|<tr><th>Type of facility</th><td>{{{type|}}}</td></tr>}}<!--
 
-->{{#if:{{{founder|}}}{{{owner|}}}{{{builder|}}}{{{landscape_architect|}}}{{{other_designers|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">People</th></tr>}}<!--
 
-->{{#if:{{{founder|}}}{{{owner|}}}{{{builder|}}}{{{landscape_architect|}}}{{{other_designers|}}}|<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>}}<!--
 
-->{{#if:{{{founder|}}}|<tr><th>Founder</th><td>{{{founder|}}}</td></tr>}}<!--
 
-->{{#if:{{{owner|}}}|<tr><th>Owner</th><td>{{{owner|}}}</td></tr>}}<!--
 
-->{{#if:{{{owner|}}}|<tr><th>Owner</th><td>{{{owner|}}}</td></tr>}}<!--
 
-->{{#if:{{{landscape_architect|}}}|<tr><th>Landscape Architect</th><td>[[{{{landscape_architect|}}}]]</td></tr>}}<!--
 
-->{{#if:{{{landscape_architect|}}}|<tr><th>Landscape Architect</th><td>[[{{{landscape_architect|}}}]]</td></tr>}}<!--
-->{{#if:{{{other_designers|}}}|<tr><th>Other designers</th><td>[[{{{other_designers|}}}]]</td></tr>}}<!--
+
-->{{#if:{{{other_designers|}}}|<tr><th>Other designers</th><td><div style="line-height:1.2em;";>{{#arraymap:{{{other_designers|}}}|;|x|[[x]]}}</div></td></tr>}}<!--
 
-->{{#if:{{{builder|}}}|<tr><th>Builder</th><td>{{{builder|}}}</td></tr>}}<!--
 
-->{{#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>}}<!--
 
-->{{#if:{{{founded|}}}{{{opened|}}}|<tr><th style="text-align: center; background-color:#ededed; font-weight: bold;", colspan="2">Dates</th></tr>}}<!--
-->{{#if:{{{founded|}}}|<tr><th>Founded</th><td>{{{founded|}}}</td></tr>}}<!--
+
-->{{#if:{{{founded|}}}|<tr><th>Founded</th><td>{{yesno|{{{founded_approx|}}}|yes=Abt:&nbsp;}}{{{founded|}}}</td></tr>}}<!--
-->{{#if:{{{opened|}}}|<tr><th>Opened to Public</th><td>{{{opened|}}}</td></tr>}}<!--
+
-->{{#if:{{{opened|}}}|<tr><th>Opened to Public</th><td>{{yesno|{{{opened_approx|}}}|yes=Abt:&nbsp;}}{{{opened|}}}</td></tr>}}<!--
 
<!--
 
<!--
 
National Register
 
National Register
Line 52: Line 96:
 
-->{{#if:{{{NRHP_ID|}}}|<tr><th>ID Number</th><td>[{{{NRHP_url}}} {{{NRHP_ID}}}]</td></tr>}}
 
-->{{#if:{{{NRHP_ID|}}}|<tr><th>ID Number</th><td>[{{{NRHP_url}}} {{{NRHP_ID}}}]</td></tr>}}
 
|}
 
|}
 +
 
[[Category:Grounds]]
 
[[Category:Grounds]]
 
</includeonly>
 
</includeonly>

Latest revision as of 09:12, July 18, 2021

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

{{Grounds
|name=
|alt_name=
|image=
|address=
|perimeter=
|Geo=
|founder=
|owner=
|landscape_architect=
|other_designers=
|builder=
|acreage=
|elevation=
|founded=
|founded_approx=
|opened=
|opened_approx=
|type=
|NRHP_ID=
|NRHP_url=
}}

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