Template:Event: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Class template|class=Event2|category=Event2s}}
<noinclude>{{Class template|class=Event|category=Events}}
== TemplateData ==
== TemplateData ==
<templatedata>
<templatedata>
Line 6: Line 6:
"event_type": {
"event_type": {
"label": "Event type",
"label": "Event type",
"description": "Type of event.",
"description": "Type of event (comma separated list)",
"type": "string",
"type": "string",
"suggestedvalues": [
"suggestedvalues": [
Line 22: Line 22:
"description": "An external link for the event.",
"description": "An external link for the event.",
"type": "url"
"type": "url"
},
"poster": {
"label": "Poster/image",
"description": "A key image or poster for the event.",
"type": "wiki-file-name"
},
},
"status": {
"status": {
Line 35: Line 30:
"Active",
"Active",
"Inactive",
"Inactive",
"Paused"
"Paused",
                "Unknown"
],
],
"suggested": true
"suggested": true
Line 80: Line 76:
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true
"required": true
},
"flag": {
"label": "Flag",
"description": "One or more flags from the import/parsing process—used to display specific mboxes on events of imported status (comma separated list).",
"type": "string"
}
}
},
},
Line 89: Line 90:
"short_name",
"short_name",
"website",
"website",
"poster",
"recurring",
"recurring",
"frequency",
"frequency",
"city",
"city",
"state_province",
"state_province",
"country"
"country",
"flag"
]
]
}
}
Line 100: Line 101:
</noinclude><!--
</noinclude><!--
--><includeonly><!--
--><includeonly><!--
-->{{Infobox event2
-->{{#switch:{{{status|}}}
| Imported={{Imported event}}
}}<!--
-->{{Infobox event
| title                = {{PAGENAME}}
| title                = {{PAGENAME}}
| short_name          = {{{short_name|}}}
| short_name          = {{{short_name|}}}
Line 111: Line 115:
| state_province      = {{{state_province|}}}
| state_province      = {{{state_province|}}}
| country              = {{{country|}}}
| country              = {{{country|}}}
}}
}}<!--
-->[[Category:Event2s]]<!--
-->[[Category:Events]]<!--
-->{{#if:{{#show:{{PAGENAME}}|?Has event type#}}|
-->{{#if:{{#show:{{PAGENAME}}|?Has event type#}}|
   {{#arraymap:{{#show:{{PAGENAME}}|?Has event type#}}|,|@@@@|
   {{#arraymap:{{#show:{{PAGENAME}}|?Has event type#}}|,|@@@@|
     <!-- General Place Type -->
     <!-- General Event Type -->
     [[Category:{{#switch:{{lc:@@@@}}
     {{#switch:{{lc:@@@@}}
       | art book fair = Art book fairs
       | art book fair = [[Category:Art book fairs]]
       | class = Classes
       | class = [[Category:Classes]]
       | exhibition = Exhibitions
       | exhibition = [[Category:Exhibitions]]
       | zine fest = Zine fests
       | zine fest = [[Category:Zine fests]]
       | meetup = Meetups
       | meetup = [[Category:Meetups]]
       | comics expo = Comics expos
       | comics expo = [[Category:Comics expos]]
       | conference = Conferences
       | conference = [[Category:Conferences]]
     }}]]
      | unknown = [[Category:Events of unknown type]]
     }}
   |}}
   |}}
}}<!--
}}<!--
Line 134: Line 139:
}}<!--
}}<!--
-->{{#set:
-->{{#set:
   Has event type          = {{{event_type|}}}
   Has event type          = {{{event_type|}}}|+sep=,
| Has status              = {{{status|}}}
| Has status              = {{{status|}}}
| Has short name          = {{{short_name|}}}
| Has short name          = {{{short_name|}}}
| Is recurring            = {{{recurring|}}}
| Is recurring            = {{{recurring|}}}
| Has frequency            = {{{frequency|}}}
| Has frequency            = {{{frequency|}}}
| Has URL                  = {{{website|}}}
| In city                  = {{{city|}}}
| In city                  = {{{city|}}}
| In state/province        = {{{state_province|}}}
| In state/province        = {{{state_province|}}}
| In country              = {{{country|}}}
| In country              = {{{country|}}}
| In region                = {{#if:{{{country|}}}|{{CountryRegionMapping|country={{{country}}}}}|}}
| In region                = {{#if:{{{country|}}}|{{CountryRegionMapping|country={{{country}}}}}|}}
}}</includeonly>
| Has flag                = {{{flag|}}}|+sep=,
}}<nowiki/></includeonly>

Latest revision as of 11:14, 11 September 2025

Warning: Class template
This is the main template for the Event class—it should primarily be used with Form:Event to create or edit associated pages, and not invoked in other circumstances. Most of the content can be edited with the VisualEditor, but for best functionality please use the specified form.

Pages which use this template are listed at Category:Events.

TemplateData

The main template for the "Event" class (fairs, conferences, meetups, etc.). This template handles semantic annotation and transcludes display templates for the data (mainly Template:Infobox event).

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Event typeevent_type

Type of event (comma separated list)

Suggested values
Art Book Fair Comics Expo Conference Exhibition Meetup Zine Fest
Stringrequired
Statusstatus

The status of the event.

Suggested values
Active Inactive Paused Unknown
Stringsuggested
Short name/acronymshort_name

A shortened version of the event name (used to generate event names for recurring events, e.g. SABF 2024, SABF 2025).

Stringsuggested
Websitewebsite

An external link for the event.

URLoptional
Recurringrecurring

Whether or not this is a recurring event, or a one-off one.

Booleanrequired
Frequencyfrequency

How frequently the event occurs.

Suggested values
Once Annually Biennially Semiannually Monthly Weekly Abstract
Stringoptional
Citycity

The city of the event (used for sorting, not address display).

Stringoptional
State/provincestate_province

The state/province of the event (used for sorting, not address display).

Page nameoptional
Countrycountry

The country of the event (used for sorting, not address display).

Page namerequired
Flagflag

One or more flags from the import/parsing process—used to display specific mboxes on events of imported status (comma separated list).

Stringoptional