Template:Event: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Class template|class=Event|category=Events}}
<noinclude>{{Class template|class=Event|category=Events}}
== TemplateData ==
<templatedata>
<templatedata>
{
{
Line 22: Line 23:
"type": "url"
"type": "url"
},
},
"start_date": {
"poster": {
"label": "Start Date",
"label": "Poster/image",
"description": "Start date of the event.",
"description": "A key image or poster for the event.",
"type": "date"
"type": "wiki-file-name"
},
},
"end_date": {
"status": {
"label": "End date",
"label": "Status",
"description": "End date of the event.",
"description": "The status of the event.",
"type": "date"
"type": "string",
"suggestedvalues": [
"Active",
"Inactive",
"Paused"
],
"suggested": true
},
},
"venue": {
"frequency": {
"label": "Venue",
"label": "Frequency",
"description": "The name of the venue (can link to a page if there is an associated location, otherwise appears as a red link).",
"description": "How frequently the event occurs.",
"type": "wiki-page-name"
"type": "string",
},
"suggestedvalues": [
"address": {
"Once",
"label": "Address",
"Annually",
"description": "The address of the event (or main address if there are multiple). This should be a full street address.",
"Biennially",
"type": "string"
"Semiannually",
"Monthly",
"Weekly",
"Abstract"
]
},
},
"city": {
"instances": {
"label": "City",
"label": "Instances",
"description": "The city of the event.",
"description": "A list of the instances of the event. These are implemented with Template:Event/instance—please use the page form Form:Event to edit them.",
"type": "string"
"type": "content"
},
},
"country": {
"short_name": {
"label": "Country",
"label": "Short name/acronym",
"description": "The country of the event.",
"description": "A shortened version of the event name (used to generate event names for recurring events, e.g. SABF 2024, SABF 2025).",
"type": "string",
"required": true
},
"coordinates": {
"label": "Coordinates",
"description": "The latitude and longitude coordinates of the space (optional, to support map display). Formatted with a comma, no space.",
"example": "47.621937,-122.351746",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
},
"application_link": {
"label": "Application link",
"description": "A link to the application form/process for the event.",
"type": "url"
},
"application_deadline": {
"label": "Application deadline",
"description": "The deadline for application submissions.",
"type": "date"
},
"poster": {
"label": "Poster/image",
"description": "A key image or poster for the event.",
"type": "wiki-file-name"
}
}
},
},
"description": "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).",
"description": "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).",
"format": "block"
"format": "block",
"paramOrder": [
"event_type",
"status",
"short_name",
"frequency",
"websites",
"poster",
"instances"
]
}
}
</templatedata>
</templatedata>
Line 86: Line 84:
| event_type          = {{{event_type|}}}
| event_type          = {{{event_type|}}}
| status              = {{{status|}}}
| status              = {{{status|}}}
| frequency            = {{{status|}}}
| frequency            = {{{frequency|}}}
| years_held          = {{{years_held|}}}
| websites            = {{{websites|}}}
| websites            = {{{websites|}}}
| poster              = {{{poster|}}}
| poster              = {{{poster|}}}
| venue                = {{{venue|}}}
| location            = {{{address|}}}
| city                = {{{city|}}}
| city                = {{{city|}}}
| state_province      = {{{state_province|}}}
| state_province      = {{{state_province|}}}
| country              = {{{country|}}}
| country              = {{{country|}}}
<!-- DEPRECATED FIELDS BELOW (NOW HELD IN SUBOBJECTS) -->
| venue                = {{{venue|}}}
| location            = {{{address|}}}
| coordinates          = {{{coordinates|}}}
| coordinates          = {{{coordinates|}}}
| application_link    = {{{application_link|}}}
| application_deadline = {{{application_deadline|}}}
| start_date          = {{{start_date|}}} <!-- DEPRECATED -->
| start_date          = {{{start_date|}}} <!-- DEPRECATED -->
| end_date            = {{{end_date|}}} <!-- DEPRECATED -->
| end_date            = {{{end_date|}}} <!-- DEPRECATED -->
<!--| event_type          = {{#arraymap:{{{event_type|}}}|,|x|[[event_type::x]]}}-->
| application_deadline = {{{application_deadline|}}} <!-- DEPRECATED -->
<!--| address              = {{#if:{{{address|}}}
| application_link     = {{{application_link|}}} <!-- DEPRECATED -->
| {{{address}}}{{#if:{{{city|}}}|, {{{city}}}}}{{#if:{{{country|}}}|, {{{country}}}}}
| {{#if:{{{city|}}}
     | {{{city}}}{{#if:{{{country|}}}|, {{{country}}}}}
    | {{{country|}}}
  }}
}}-->
}}<!--
}}<!--
-->{{{people|}}}<!--
-->{{Event/upcoming}}<!--
-->[[Category:Events]]
-->[[Category:Events]]<!--
{{#if:{{{event_type|}}}|
-->{{#if:{{#show:{{PAGENAME}}|?Has event type#}}|
   {{#arraymap:{{{event_type}}}|,|x|
   {{#arraymap:{{#show:{{PAGENAME}}|?Has event type#}}|,|@@@@|
     {{#if:x|
     <!-- General Place Type -->
      <!-- General Place Type -->
    [[Category:{{#switch:{{lc:@@@@}}
      [[Category:{{#switch:{{lc:x}}
      | art book fair = Art book fairs
        | art book fair = Art book fairs
      | class = Classes
        | class = Classes
      | exhibition = Exhibitions
        | exhibition = Exhibitions
      | zine fest = Zine fests
        | zine fest = Zine fests
      | meetup = Meetups
        | meetup = Meetups
      | comics expo = Comics expos
        | comics expo = Comics expos
      | conference = Conferences
        | #default = {{ucfirst:x}}s
    }}]]
      }}]]
  |}}
    }}
}}<!--
        <!-- Place Type + Country -->
-->{{#invoke:Geography|geoCategories
      {{#if:{{{country|}}}|
  | class = event
        [[Category:{{#switch:{{lc:x}}
  | country = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In country#|format=plainlist|headers=hide|mainlabel=-}}
          | art book fair = Art Book Fairs
  | state_province = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In state/province#|format=plainlist|headers=hide|mainlabel=-}}
          | class = Classes
  | city = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In city#|format=plainlist|headers=hide|mainlabel=-}}
          | exhibition = Exhibitions
          | zine fest = Zine Fests
          | #default = {{ucfirst:x}}s
        }} in {{{country}}}]]
      }}
 
      <!-- Place Type + Region -->
      {{#if:{{{country|}}}|
        [[Category:{{#switch:{{lc:x}}
          | art book fair = Art Book Fairs
          | class = Classes
          | exhibition = Exhibitions
          | zine fest = Zine Fests
          | #default = {{ucfirst:x}}s
        }} in {{CountryRegionMapping|country={{{country}}}}}]]
      }}
|}} <!-- No delimiter -->
}}<!--
}}<!--
-->{{#set:
-->{{#set:
   Has event type          = {{{event_type|}}}
   Has event type          = {{{event_type|}}}
| Has status              = {{{status|}}}
| Has status              = {{{status|}}}
| Has short name          = {{{short_name|}}}
| Has frequency            = {{{frequency|}}}
| Has frequency            = {{{frequency|}}}
| At venue                = {{{venue|}}}
| In city                  = {{{city|}}}
<!-- | Has address              = {{#if:{{{address|}}}
| In state/province        = {{{state_province|}}}
| {{{address}}}{{#if:{{{city|}}}|, {{{city}}}}}{{#if:{{{country|}}}|, {{{country}}}}}
| {{#if:{{{city|}}}
    | {{{city}}}{{#if:{{{country|}}}|, {{{country}}}}}
    | {{{country|}}}
  }}
}} -->
| At location              = {{{address|}}}
| At coordinates          = {{{coordinates|}}}
| In city                  = {{{city|}}}  
| 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}}}}}|}}
| Has application link    = {{{application_link|}}}
<!-- DEPRECATED FIELDS BELOW (NOW HELD IN SUBOBJECTS) -->
| At coordinates          = {{{coordinates|}}}
| Has application URL      = {{{application_link|}}}
| Has application deadline = {{{application_deadline|}}}
| Has application deadline = {{{application_deadline|}}}
| Has end date            = {{{end_date|}}} <!-- DEPRECATED -->
| Has end date            = {{{end_date|}}}
| Has start date          = {{{start_date|}}} <!-- DEPRECATED -->
| Has start date          = {{{start_date|}}}
}}<!--
}}{{{instances|}}}<!--
--></includeonly>
--></includeonly>

Latest revision as of 11:16, 20 January 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.

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

The status of the event.

Suggested values
Active Inactive Paused
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
Frequencyfrequency

How frequently the event occurs.

Suggested values
Once Annually Biennially Semiannually Monthly Weekly Abstract
Stringoptional
Websiteswebsites

A list of links for the event.

URLoptional
Poster/imageposter

A key image or poster for the event.

Fileoptional
Instancesinstances

A list of the instances of the event. These are implemented with Template:Event/instance—please use the page form Form:Event to edit them.

Contentoptional