Template:AllusionsItemTop: Difference between revisions

From International Robin Hood Bibliography
mNo edit summary
mNo edit summary
Line 27: Line 27:
{{#vardefine:AuthorSuffix|{{#ifeq:{{{AuthorSuffix|}}}|||{{{AuthorSuffix}}}}}}}{{#vardefine:AuthorSuffix|{{#replace:{{#var:AuthorSuffix}}|[|[}}}}{{#vardefine:AuthorSuffix|{{#replace:{{#var:AuthorSuffix}}|]|]}}}}
{{#vardefine:AuthorSuffix|{{#ifeq:{{{AuthorSuffix|}}}|||{{{AuthorSuffix}}}}}}}{{#vardefine:AuthorSuffix|{{#replace:{{#var:AuthorSuffix}}|[|[}}}}{{#vardefine:AuthorSuffix|{{#replace:{{#var:AuthorSuffix}}|]|]}}}}


{{#vardefine:PlainTitle:{{#ifeq:{{{PlainTitle|}}}||No|Yes}}}}
<!--{{#vardefine:PlainTitle:{{#ifeq:{{{PlainTitle|}}}||No|Yes}}}}-->


{{#ifeq:{{#sub:{{#var:Title}}|0|1}}|[|{{#vardefine:PlainTitle|No}}|}}
<!--{{#ifeq:{{#sub:{{#var:Title}}|0|1}}|[|{{#vardefine:PlainTitle|No}}|}}-->


{{#vardefine:FormatTitle|{{#ifeq:{{#var:PlainTitle}}|Yes|{{#var:Title}}|''{{#var:Title}}''}}}}
{{#vardefine:FormatTitle|{{#ifeq:{{{PlainTitle|}}}||''{{#var:Title}}''|{{#var:Title}}}}}}





Revision as of 13:46, 8 June 2018

This template sets up page variables on item pages in IRHB's allusions section. It takes the following parameters which are all optional, except About:
  • Date – use for four-digit year if date in page name is in different format (rarely the case)
  • DatePrefix – typically for "c. "
  • DateSuffix – for instance for "?" or hyphen and four-digit upper year
  • AuthorPrefix – typically with value "["
  • Author – where form of author's name in info box should be different from that in page title
  • AuthorSuffix – typically with value "?" (in cases of doubtful attribution) or "]"
  • Title – where form of title in info box should be different from that in page title, for instance when a shorter form has been used in page name
  • About – the keyword list or summary of Robin Hood allusion
  • PlainTitle – Any non-empty value causes title of work to be formatted in plain (not italic) type. For MS or acephalous works, works without a title etc.
  • Poem – Any non-empty value causes the page also to be listed on the Poetry section landing page
  • Chronicle – Any non-empty value causes the page also to be listed on the Chronicles section landing page
  • Proverb1 to Proverb3 – one-word shorthand reference to proverb
  • Cat1 to Cat10 – Ad hoc categories. Also shown in "Also see" section
  • CatName1 to CatName10 – Link text when this should be different from page name linked to
  • HidCat1 to HidCat5 – Hidden ad hoc categories. Not shown in "Also see" section
  • ExtraLink1 to ExtraLink10 – Ad hoc internal links for "Also see" section
  • ExtraLinkName1 to ExtraLinkName10 – Link text where this should be different from the page title linked to, for instance when linking to a DIV or SPAN on a page (using its ID).