Widget:ContactInfo

From neicext
Jump to navigation Jump to search

Create a contact info table using public info from neicweb contact api (https://neic.nordforsk.org/int/api/contact/), and optionally additional columns with contact information that should only be published on the NeIC internal wiki.

Usage

{{#widget:ContactInfo
 | webpage = Url to link to, in case the user does not use javascript.
 | contact_api = Optional. Https url to neicweb api to get JSON contact information.
 | additional = Optional. Additional contact info in YAML format (see below).
 | headings = Optional. What column headings to display. Default is name,role,email,home,country,groups,phone.
 }}

headings is given as a comma separated list of words present as keys in either additional or the info provided by contact_api.

additional is expected to be a associative array on the form person_id:person_info overriding what is given by the contact_api, but can also contain additional attributes. Some attributes are special:

Example

{{#widget:ContactInfo
 | webpage = https://neic.nordforsk.org/about/team/tryggve/
 | contact_api = https://neic.nordforsk.org/int/api/contact/tryggve/
 | headings = name,role,email,home,country,groups,phone,skype
 | additional= 
 hedlund:
   skype: joel.hedlund
   phone: M: +46734 607126.
 pursula:
   skype: kimmo.koski
 bernadotte:
   skype: mr_king.se

 }}