Bahaipedia
Bahaipedia
Menu
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Module
Discussion
View history
Talk
Contributions
Create account
Log in
Navigation
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Learn more
Core topics
Bahá’í Faith
Central Figures
Teachings
Practices
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Translations

Module:InfoboxWB/doc

From Bahaipedia
< Module:InfoboxWB
Jump to:navigation, search
This is a documentation subpage for Module:InfoboxWB.
It may contain usage information, categories and other content that is not part of the original module page.

This is a helper module for retrieving data from bahaidata.org. It is intended to be referenced by a template which is used on a page that is already connected to a wikibase item. It does not support retrieving specific items or their properties from bahaidata since this module is specific to infoboxes used on pages which should always have a corresponding connected bahaidata page.

Contents

  • 1 Functions
  • 2 Parameters
  • 3 Examples
    • 3.1 Basic
    • 3.2 Lang parameter
    • 3.3 Format parameter
  • 4 To do

Functions[edit]

  • getImage
  • getImageCaption
  • getBirthName
  • getBirthDate
  • getBirthPlace
  • getBirthCountry
  • getDeclarationDate
  • getDeathDate
  • getDeathPlace
  • getDeathCountry
  • getDeceasedAge (The age of the individual at the time of their death)
  • getSisterProjects

Parameters[edit]

  • lang, used to specify a language you want retrieved and displayed if other then English. If the requested language value doesn't exist then the English language value is displayed.
  • format, used to modify the display format for dates, options are mdy (default) and dmy

Examples[edit]

Basic[edit]

  • {{#invoke:InfoboxWB|getDeathPlace}}
  • {{#invoke:InfoboxWB|getImageCaption}}
  • {{#invoke:InfoboxWB|getDeathDate}}

Lang parameter[edit]

  • {{#invoke:InfoboxWB|getImageCaption|lang=es}}

Format parameter[edit]

  • {{#invoke:InfoboxWB|getDeathDate|format=dmy}}

To do[edit]

The adaptation so far is intended for use with Template:Infobox Person but more infoboxes can be supported by adding more functions. Need to identify other data which is suitable, what functions are needed and add/test/integrate them back into the respective templates.

Retrieved from "https://bahaipedia.org/index.php?title=Module:InfoboxWB/doc&oldid=135121"
This page was last edited on 5 July 2024, at 09:53.
Text is available under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.
Privacy policy
About Bahaipedia
Disclaimers
Powered by MediaWiki