Template:FestivalsItemTop: Difference between revisions

From International Robin Hood Bibliography
mNo edit summary
m (Henryfunk moved page Template:FlItemTop to Template:FestivalsItemTop)
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude><div class="no-img">This template sets up page variables on item pages in IRHB's festivals section. It takes the following parameters:
<includeonly>{{#vardefine:Locality|{{#ifeq:{{{Locality|}}}||{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}| }}+1}}|{{{Locality}}}}}}}{{#vardefine:Vicinity|{{#ifeq:{{{Vicinity|}}}||?|{{{Vicinity|}}}}}}}{{#vardefine:Coords|{{{Lat}}},{{{Lon}}}}}{{#vardefine:Coords|{{#ifeq:{{#var:Coords}}|,||{{#var:Coords}}}}}}{{#vardefine:Demonym|{{#ifeq:{{{Demonym|}}}||English|{{{Demonym|}}}}}}}{{#vardefine:AdministrativeDivision|{{{AdministrativeDivision|}}}}}{{#vardefine:Riding|{{{Riding|}}}}}{{#vardefine:Glondon|{{#ifeq:{{{GreaterLondon|}}}|||Yes}}}}{{#vardefine:FirstYear|{{#sub:{{{FirstYear|}}}|0|4}}}}{{#vardefine:Century|{{#ifeq:{{{Century|}}}||{{#ifeq:{{#var:FirstYear}}|||{{#expr:{{#sub:{{#expr:{{#var:FirstYear}}-{{#ifeq:{{#rpos:{{#var:FirstYear}}|00}}|2|1|0}}}}|0|2}}+1}}}}|{{{Century}}}}}}}{{#vardefine:CenturyOrdinal|{{#ifeq:{{#var:Century}}|||{{#ifeq:{{#var:Century}}|21|21st|{{#var:Century}}th}}}}}}{{#vardefine:Image|{{{Image|}}}}}{{#vardefine:Utitle|{{#replace:{{uc:{{PAGENAME}}}}|&#39;|'}}}}{{#vardefine:RidingPrefixed|{{#ifeq:{{#var:AdministrativeDivision}}|Yorkshire|{{#ifeq:{{#var:Riding}}||?|{{#var:Riding}} Riding of}}|}}}}{{#vardefine:Lat|{{{Lat|}}}}}{{#vardefine:Lon|{{{Lon|}}}}}{{#vardefine:Date|{{{FirstYear|}}}}}{{#vardefine:Events|{{{Events|}}}}}
* '''Locality''' &ndash; defaults to the page name less the string " festivals".
* '''Lat''' &ndash; latitude.
* '''Lon''' &ndash; longitude.
* '''AdmDiv''' &ndash; administrative division, usually the pre-1972 county in which the locality denoted by the place-name is located. Only use value ''London'' for the City of London. For Yorkshire write one of:
** ''East Riding of Yorkshire''.
** ''North Riding of Yorkshire'' (includes City of York).
** ''West Riding of Yorkshire''.
* '''Vicinity''' &ndash; brief text to locate the locality more precisely.
* '''Riding''' &ndash; value must be one of ''East'', ''North'' or ''West''. Only for Yorkshire.
* '''Demonym''' &ndash; defaults to ''English.''
* '''GreaterLondon''' &ndash; for localities in parts of Essex, Middlesex, Surrey and Kent that are now part of Greater London. Set to ''Yes'' or any other alphanumeric string  to indicate that the locality is in Greater London.
* '''FirstYearPrefix''' &ndash; for instance "''c. ''", "before " or "after "
* '''FirstYear''' &ndash; At least four digits; can be a date in the form 1XXX-MM-DD.
* '''FirstYearSuffix''' &ndash; Typically "?" or "/YY" (for accounting year).
* '''LastYearPrefix''' &ndash; for instance "''c. ''", "before " or "after ".
* '''LastYear''' &ndash; At least four digits; can be a date in the form 1XXX-MM-DD.
* '''LastYearSuffix''' &ndash; Typically "?" or "/YY" (for accounting year).
* '''Century''' &ndash; Century in which activity first occurred, defaults to (first four digits of) value of '''FirstYear'''
* '''Events''' &ndash; Short "index-like" description of events.
* '''Image''' &ndash; image filename, including extension.
</div></noinclude><includeonly>
<!--{{#vardefine:Locality|{{#ifeq:{{{Locality|}}}||{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}| }}+1}}|{{{Locality}}}}}-->
{{#vardefine:Vicinity|{{{Vicinity|}}}}}
{{#vardefine:Coords|{{{Lat}}},{{{Lon}}}}}{{#vardefine:Coords|{{#ifeq:{{#var:Coords}}|,||{{#var:Coords}}}}}}
{{#vardefine:Demonym|{{#ifeq:{{{Demonym|}}}||English|{{{Demonym|}}}}}}}
{{#vardefine:AdmDiv|{{{AdmDiv|}}}}}
{{#vardefine:Riding|{{{Riding|}}}}}
{{#vardefine:Glondon|{{#ifeq:{{{GreaterLondon|}}}|||Yes}}}}
{{#vardefine:FirstYear|{{#sub:{{{FirstYear|}}}|0|4}}}}
{{#vardefine:Century|{{#ifeq:{{{Century|}}}||{{#ifeq:{{#var:FirstYear}}|||{{#expr:{{#sub:{{#expr:{{#var:FirstYear}}-{{#ifeq:{{#rpos:{{#var:FirstYear}}|00}}|2|1|0}}}}|0|2}}+1}}}}|{{{Century}}}}}}}
{{#vardefine:CenturyOrdinal|{{#ifeq:{{#var:Century}}|||{{#ifeq:{{#var:Century}}|21|21st|{{#var:Century}}th}}}}}}
{{#vardefine:Flimage|{{{Image|}}}}}
{{#vardefine:Utitle|{{#replace:{{uc:{{PAGENAME}}}}|&#39;|'}}}}
{{#vardefine:RidingPrefixed|{{#ifeq:{{#var:AdmDiv}}|Yorkshire|{{#ifeq:{{#var:Riding}}||?|{{#var:Riding}} Riding of}}|}}}}
{{Infobox
{{Infobox
  |header1=Festivals
  |header1=Festivals
  |label2=Locality
  |label2=Locality
  |data2=[[fslocality::{{#var:Locality}}]]
  |data2=[[Locality::{{#var:Locality}}]]
  |label3=Vicinity
  |label3=Vicinity
  |data3=[[pnvicinity::{{#var:Vicinity}}]]
  |data3=[[Vicinity::{{#var:Vicinity}}]]
  |label4=Coordinates
  |label4=Coordinate
  |data4=[[Geopoint::{{#var:Coords}}]]
  |data4=[[Geopoint::{{#var:Coords}}]]
  |label5=Adm.&nbsp;div.
  |label5=Adm.&nbsp;div.
  |data5={{#var:RidingPrefixed}} [[pnadmdiv::{{#var:AdmDiv}}]]{{#ifeq:{{#var:Glondon}}|||, now Greater London}}
  |data5={{#var:RidingPrefixed}} [[AdministrativeDivision::{{#var:AdministrativeDivision}}]]{{#ifeq:{{#var:Glondon}}|||, now Greater London}}
  |label6=Began
  |label6=Began
  |data6={{{FirstYearPrefix|}}}[[fsbegan::{{{FirstYear|}}}]]{{{FirstYearSuffix|}}}
  |data6={{{FirstYearPrefix|}}}[[FirstRecord::{{#var:Date}}]]{{{FirstYearSuffix|}}}
  |label7=Ended
  |label7=Ended
  |data7={{{LastYearPrefix|}}}[[fsended::{{{LastYear|}}}]]{{{LastYearSuffix|}}}
  |data7={{{LastYearPrefix|}}}[[LastRecord::{{{LastYear|}}}]]{{{LastYearSuffix|}}}
  |label8=Events
  |label8=Events
  |data8=[[fsevents::{{{Events|}}}]]
  |data8=[[Events::{{#var:Events}}]]
}}
}}
</includeonly>
</includeonly>
<noinclude>
<templatedata>
{
"params": {
"Locality": {
"label": "Locality",
"description": "The name of the locality",
"example": "Ashburton",
"type": "string",
"default": "Page name minus the string \" festivals\".",
"required": true
},
"Vicinity": {
"label": "Vicinity",
"description": "Brief text to locate the locality more precisely",
"type": "string",
"required": true
},
"Lat": {
"label": "Lat",
"description": "Latitude",
"example": "Values in interval 0-180",
"type": "number",
"suggested": true
},
"Lon": {
"label": "Lon",
"description": "Longitude",
"type": "number",
"default": "Values in interval 0-90",
"suggested": true
},
"Demonym": {
"label": "Demonym",
"description": "Demonym",
"example": "Scottish",
"type": "string",
"default": "English"
},
"AdministrativeDivision": {
"label": "AdministrativeDivision",
"description": "County (administrative division), usually pre-1972 county",
"example": "Devon",
"type": "string",
"required": true
},
"Riding": {
"label": "Riding",
"description": "One of the three ridings of Yorkshire",
"example": "East, North, West",
"type": "string"
},
"GreaterLondon": {
"label": "GreaterLondon",
"description": "Is the county part of Greater London?",
"example": "Yes",
"default": "No (any value means \"Yes\")"
},
"FirstYear": {
"label": "FirstYear",
"description": "The earliest year for which there is evidence",
"example": "1554; (at least four digits; can be a date in the form 1XXX-MM-DD)",
"type": "string"
},
"Century": {
"label": "Century",
"description": "Century in which activity first occurred",
"example": "16",
"type": "number",
"default": "Defaults to (first four digits of) value of FirstYear"
},
"Image": {
"label": "Image",
"description": "File name (as used in MediWiki, not the actual pathname)",
"type": "string"
},
"Events": {
"label": "Events",
"description": "Semi-colon-separated list or short decriptive text",
"example": "Robin Hood; Maid Marian; Little John; church ale",
"type": "string",
"required": true
},
"FirstYearPrefix": {
"label": "FirstYearPrefix",
"description": "Prefix to the first year",
"default": "c.; before; after"
},
"FirstYearSuffix": {
"label": "FirstYearSuffix",
"description": "Suffix to first year",
"type": "string",
"default": "?; /YY [for accounting year]"
},
"LastYearPrefix": {
"label": "LastYearPrefix",
"description": "Prefix to last year",
"default": "c.; before; after"
},
"LastYear": {
"label": "LastYear",
"description": "The latest year for which there is evidence",
"type": "string",
"default": "At least four digits; can be date in form 1XXX-MM-DD"
},
"LastYearSuffix": {
"label": "LastYearSuffix",
"description": "Suffix to the last year",
"type": "string",
"default": "?; /YY [for accounting year]"
}
},
"description": "Sets up page variables on item pages in Festivals section."
}
</templatedata>
</noinclude>

Latest revision as of 13:27, 7 January 2021


Sets up page variables on item pages in Festivals section.

Template parameters

ParameterDescriptionTypeStatus
LocalityLocality

The name of the locality

Default
Page name minus the string " festivals".
Example
Ashburton
Stringrequired
VicinityVicinity

Brief text to locate the locality more precisely

Stringrequired
LatLat

Latitude

Example
Values in interval 0-180
Numbersuggested
LonLon

Longitude

Default
Values in interval 0-90
Numbersuggested
DemonymDemonym

Demonym

Default
English
Example
Scottish
Stringoptional
AdministrativeDivisionAdministrativeDivision

County (administrative division), usually pre-1972 county

Example
Devon
Stringrequired
RidingRiding

One of the three ridings of Yorkshire

Example
East, North, West
Stringoptional
GreaterLondonGreaterLondon

Is the county part of Greater London?

Default
No (any value means "Yes")
Example
Yes
Unknownoptional
FirstYearFirstYear

The earliest year for which there is evidence

Example
1554; (at least four digits; can be a date in the form 1XXX-MM-DD)
Stringoptional
CenturyCentury

Century in which activity first occurred

Default
Defaults to (first four digits of) value of FirstYear
Example
16
Numberoptional
ImageImage

File name (as used in MediWiki, not the actual pathname)

Stringoptional
EventsEvents

Semi-colon-separated list or short decriptive text

Example
Robin Hood; Maid Marian; Little John; church ale
Stringrequired
FirstYearPrefixFirstYearPrefix

Prefix to the first year

Default
c.; before; after
Unknownoptional
FirstYearSuffixFirstYearSuffix

Suffix to first year

Default
?; /YY [for accounting year]
Stringoptional
LastYearPrefixLastYearPrefix

Prefix to last year

Default
c.; before; after
Unknownoptional
LastYearLastYear

The latest year for which there is evidence

Default
At least four digits; can be date in form 1XXX-MM-DD
Stringoptional
LastYearSuffixLastYearSuffix

Suffix to the last year

Default
?; /YY [for accounting year]
Stringoptional