Template:Event: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(18 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 21: Line 22:
"description": "A list of links for the event.",
"description": "A list of links for the event.",
"type": "url"
"type": "url"
},
"start_date": {
"label": "Start Date",
"description": "Start date of the event.",
"type": "date"
},
"end_date": {
"label": "End date",
"description": "End date of the event.",
"type": "date"
},
"venue": {
"label": "Venue",
"description": "The name of the venue (can link to a page if there is an associated location, otherwise appears as a red link).",
"type": "wiki-page-name"
},
"address": {
"label": "Location",
"description": "The address of the event (or main address if there are multiple). This can be a full street address or broader region.",
"type": "string"
},
"city": {
"label": "City",
"description": "The city of the event (used for sorting, not address display).",
"type": "string"
},
"country": {
"label": "Country",
"description": "The country of the event (used for sorting, not address display).",
"type": "wiki-page-name",
"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",
"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": {
"poster": {
Line 85: Line 38:
],
],
"suggested": true
"suggested": true
},
"state_province": {
"label": "State/province",
"description": "The state/province of the event (used for sorting, not address display).",
"type": "string"
},
},
"frequency": {
"frequency": {
Line 109: Line 57:
"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.",
"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": "content"
"type": "content"
},
"short_name": {
"label": "Short name/acronym",
"description": "A shortened version of the event name (used to generate event names for recurring events, e.g. SABF 2024, SABF 2025).",
"type": "string",
"suggested": true
}
}
},
},
Line 116: Line 70:
"event_type",
"event_type",
"status",
"status",
"short_name",
"frequency",
"frequency",
"websites",
"websites",
"poster",
"poster",
"instances",
"instances"
"start_date",
"end_date",
"venue",
"address",
"city",
"state_province",
"country",
"coordinates",
"application_link",
"application_deadline"
]
]
}
}
Line 139: 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|}}}  
-->{{Event/upcoming}}<!--
    | {{{city}}}{{#if:{{{country|}}}|, {{{country}}}}}
-->[[Category:Events]]<!--
    | {{{country|}}}
-->{{#if:{{#show:{{PAGENAME}}|?Has event type#}}|
  }}  
  {{#arraymap:{{#show:{{PAGENAME}}|?Has event type#}}|,|@@@@|
}}-->
    <!-- General Place Type -->
    [[Category:{{#switch:{{lc:@@@@}}
      | art book fair = Art book fairs
      | class = Classes
      | exhibition = Exhibitions
      | zine fest = Zine fests
      | meetup = Meetups
      | comics expo = Comics expos
      | conference = Conferences
    }}]]
  |}}
}}<!--
}}<!--
-->{{{instances|}}}<!--
-->{{#invoke:Geography|geoCategories
-->[[Category:Events]]
  | class = event
{{#if:{{{event_type|}}}|
   | country = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In country#|format=plainlist|headers=hide|mainlabel=-}}
   {{#arraymap:{{{event_type}}}|,|x|
  | state_province = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In state/province#|format=plainlist|headers=hide|mainlabel=-}}
    {{#if:x|
  | city = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In city#|format=plainlist|headers=hide|mainlabel=-}}
      <!-- General Place Type -->
      [[Category:{{#switch:{{lc:x}}
        | art book fair = Art book fairs
        | class = Classes
        | exhibition = Exhibitions
        | zine fest = Zine fests
        | meetup = Meetups
        | comics expo = Comics expos
        | #default = {{ucfirst:x}}s
      }}]]
    }}
        <!-- Place Type + Country -->
      {{#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 {{{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