Template:Closed place: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This template displays a message on places with a "closed" <code>status</code> value to let readers know they are viewing a page about a place which no longer exists. It is embedded in [[Template:Page]] and should not need to be invoked directly.
This template displays a message on places with a "Closed" <code>status</code> value to let readers know they are viewing a page about a place which no longer exists. It also adds the page to [[:Category:Closed places]].
 
It is embedded in [[Template:Place]] and should not need to be invoked directly.


== Usage ==
== Usage ==
This template takes no parameters, and instead gathers all its information from the semantic properties of the parent page. If a closed year was provided in the [[Form:Place]] for that page, a line about it will be included as well.
This template takes no parameters, and instead gathers all its information from the semantic properties of the parent page. If a closed year was provided in the [[Form:Place]] for that page, a line about it will be included as well. If a "Status message" (i.e. <code>status_text</code>) was provided for the form, this will replace the message box text.
<pre>
<pre>
{{Closed place}}
{{Closed place}}
</pre>
</pre>
{{Closed place}}
{{mbox
 
| text=This article describes a place which no longer exists. It remains on the wiki for historical reference.
=== Custom message ===
| color_bar=#FF665E
 
| class=closed-place-ambox
However, if a parameter is provided, it will overwrite the text message (if, for example you need a more complex description of the closure of the place).
| icon=heart-crack
 
| background=#FFF7F7
<pre>
| border=1px solid #FFF0EF
{{Closed place|The studio itself closed in 2018, however the artists still publish through other printshops in the Chicago area.}}
}}
</pre>
{{Closed place|The studio itself closed in 2018, however the artists still publish through other printshops in the Chicago area.}}
 
== TemplateData ==
<templatedata>
{
"params": {
"1": {
"label": "Alternate text",
"description": "Custom text to display in the message box, instead of the default message.",
"type": "string"
}
},
"description": "Included as a notice on places that are no longer active."
}
</templatedata>
</noinclude><!--
</noinclude><!--
--><includeonly>{{mbox
--><includeonly>{{mbox
  | title={{#if:{{#show:{{PAGENAME}}|?Has place type}}|{{ucfirst:{{lc:{{#arraymap:{{#show:{{PAGENAME}}|?Has place type}}|,|@@@@|@@@@|/}}}}}}|Place}} closed
  | text={{#if:{{#show:{{PAGENAME}}|?Has status message}}|{{#show:{{PAGENAME}}|?Has status message}}|This article describes a {{#if:{{#show:{{PAGENAME}}|?Has place type}}|{{lc:{{#arraymap:{{#show:{{PAGENAME}}|?Has place type}}|,|@@@@|@@@@|/}}}}|place}} which no longer exists.{{#if:{{#show:{{PAGENAME}}|?Was closed}}|&nbsp;{{PAGENAME}} closed in {{#show:{{PAGENAME}}|?Was closed}}.|}} It remains on the wiki for historical reference.}}
| text={{{1|This article describes a {{#if:{{#show:{{PAGENAME}}|?Has place type}}|{{lc:{{#arraymap:{{#show:{{PAGENAME}}|?Has place type}}|,|@@@@|@@@@|/}}}}|place}} which no longer exists.{{#if:{{#show:{{PAGENAME}}|?Was closed}}|&nbsp;{{PAGENAME}} closed in {{#show:{{PAGENAME}}|?Was closed}}.|}}}}}
  | color_bar=#FF665E
  | color_bar=#B9C3CD
  | class=closed-place-ambox
  | class=place-closed-ambox
| icon=heart-crack
}}<!--
| background=#FFF7F7
| border=1px solid #FFF0EF
}}[[Category:Closed places]]<!--
--></includeonly>
--></includeonly>

Latest revision as of 15:03, 17 December 2024

This template displays a message on places with a "Closed" status value to let readers know they are viewing a page about a place which no longer exists. It also adds the page to Category:Closed places.

It is embedded in Template:Place and should not need to be invoked directly.

Usage

This template takes no parameters, and instead gathers all its information from the semantic properties of the parent page. If a closed year was provided in the Form:Place for that page, a line about it will be included as well. If a "Status message" (i.e. status_text) was provided for the form, this will replace the message box text.

{{Closed place}}
This article describes a place which no longer exists. It remains on the wiki for historical reference.