Template:Event: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>{{Class template|class=Event|category=Events}}
{{#template_params:event_type (label=Event Type;list)|websites|start_date (label=Start Date)|end_date (label=End Date)|event_type|venue|address|city|country|coordinates|application_link (label=Application Link)|application_deadline (label=Application Deadline)|poster (label=poster)}}
== TemplateData ==
</noinclude><includeonly>
<templatedata>
{{Infobox event
{
| event_type          = {{#arraymap:{{{event_type|}}}|,|x|[[event_type::x]]}}
"params": {
"event_type": {
"label": "Event type",
"description": "Type of event.",
"type": "string",
"suggestedvalues": [
"Art Book Fair",
"Comics Expo",
"Conference",
"Exhibition",
"Meetup",
"Zine Fest"
],
"required": true
},
"websites": {
"label": "Websites",
"description": "A list of links for the event.",
"type": "url"
},
"poster": {
"label": "Poster/image",
"description": "A key image or poster for the event.",
"type": "wiki-file-name"
},
"status": {
"label": "Status",
"description": "The status of the event.",
"type": "string",
"suggestedvalues": [
"Active",
"Inactive",
"Paused"
],
"suggested": true
},
"frequency": {
"label": "Frequency",
"description": "How frequently the event occurs.",
"type": "string",
"suggestedvalues": [
"Once",
"Annually",
"Biennially",
"Semiannually",
"Monthly",
"Weekly",
"Abstract"
]
},
"instances": {
"label": "Instances",
"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"
},
"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
}
},
"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",
"paramOrder": [
"event_type",
"status",
"short_name",
"frequency",
"websites",
"poster",
"instances"
]
}
</templatedata>
</noinclude><!--
--><includeonly><!--
-->{{Infobox event
| title                = {{PAGENAME}}
| event_type          = {{{event_type|}}}
| status              = {{{status|}}}
| frequency            = {{{frequency|}}}
| years_held          = {{{years_held|}}}
| websites            = {{{websites|}}}
| websites            = {{{websites|}}}
| start_date          = {{{start_date|}}}
| poster              = {{{poster|}}}
| end_date            = {{{end_date|}}}
| venue                = {{{venue|}}}
| address              = {{#if:{{{address|}}}
| {{{address}}}{{#if:{{{city|}}}|, {{{city}}}}}{{#if:{{{country|}}}|, {{{country}}}}}
| {{#if:{{{city|}}}
    | {{{city}}}{{#if:{{{country|}}}|, {{{country}}}}}
    | {{{country|}}}
  }}
}}
| city                = {{{city|}}}
| city                = {{{city|}}}
| 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|}}}
| start_date          = {{{start_date|}}} <!-- DEPRECATED -->
| application_deadline = {{{application_deadline|}}}
| end_date            = {{{end_date|}}} <!-- DEPRECATED -->
| poster              = {{{poster|}}}
| application_deadline = {{{application_deadline|}}} <!-- DEPRECATED -->
| application_link    = {{{application_link|}}} <!-- DEPRECATED -->
}}<!--
-->{{Event/upcoming}}<!--
-->[[Category:Events]]<!--
-->{{#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
    }}]]
  |}}
}}<!--
}}<!--
-->[[Category:Events]]
-->{{#invoke:Geography|geoCategories
{{#if:{{{event_type|}}}|
  | class = event
   {{#arraymap:{{{event_type}}}|,|x|
   | country = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In country#|format=plainlist|headers=hide|mainlabel=-}}
    {{#if:x|
  | state_province = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In state/province#|format=plainlist|headers=hide|mainlabel=-}}
      <!-- General Place Type -->
  | city = {{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:Instances]]|?In city#|format=plainlist|headers=hide|mainlabel=-}}
      [[Category:{{#switch:{{lc:x}}
        | art book fair = Art Book Fairs
        | class = Classes
        | exhibition = Exhibitions
        | zine fest = Zine Fests
        | #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 place type             = {{{event_type|}}}|+sep=,
  Has event type           = {{{event_type|}}}
    | At venue                = {{{venue|}}}
| Has status              = {{{status|}}}
    | Has address              = {{{address|}}}{{#if:{{{city|}}}|, {{{city|}}}}}{{#if:{{{country|}}}|, {{{country|}}}}}
| Has short name          = {{{short_name|}}}
    | At coordinates          = {{{coordinates|}}}
| Has frequency            = {{{frequency|}}}
    | Has application link    = {{{application_link|}}}
| In city                  = {{{city|}}}
    | Has application deadline = {{{application_deadline|}}}
| In state/province        = {{{state_province|}}}
    | Has end date            = {{{end_date|}}}
| In country              = {{{country|}}}
    | Has event type          = {{{event_type|}}}
| In region                = {{#if:{{{country|}}}|{{CountryRegionMapping|country={{{country}}}}}|}}
    | Has start date          = {{{start_date|}}}
<!-- DEPRECATED FIELDS BELOW (NOW HELD IN SUBOBJECTS) -->
    | In city                  = {{{city|}}}   
| At coordinates          = {{{coordinates|}}}
    | In country              = {{{country|}}}
| Has application URL      = {{{application_link|}}}
    | In region                = {{#if:{{{country|}}}|{{CountryRegionMapping|country={{{country}}}}}|}}
| Has application deadline = {{{application_deadline|}}}
}}<!--
| Has end date            = {{{end_date|}}}
-->
| 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