This post is a recap for a question that comes up quite often about adding information from either PURE (research@st-andrews) or Symbiosis (School) databases to WordPress sites. I’m going to try to give a summary here, and link to other posts with more detailed information.
The basic idea here is to use ‘shortcodes’ on pages of a synergy wordpress site to pull in information from these data sources. The shortcodes are instructions added to the page in [square brackets] that are interpreted by WordPress. The particular shortcodes required use a plug-in that I wrote to access various databases and do helpful things with the results.
There are a few broad types of outputs:
- Lists of research team of a single PI (at the School of Biology), either with links to individual profiles, or with profiles embedded in an ‘accordion’ on the page with the list.
- Lists of a group of researchers, perhaps with several PIs included
- Individual profile ‘pro-forma’ pages designed to be used in conjunction with one of the above (user IDs specify whose details to show). Profile pages can include data from both PURE and Symbiosis data sources
- Shortcodes that pull smaller amounts of information for one group or individual. (from either PUR or Symbiosis data sources).
The groupings for 1 and 2 are specified in Symbiosis data, but in slightly different ways. I’ve tried to give a summary below, links point to more detailed information.
Small research group where all members are in the team of a single PI
Step 1: set up the group – the PI needs to do this, here is how.
Step 2: make a new page in WordPress, then add a shortcode to show either:
- To show an ‘accordion’:
[SDS_SYMBIOSIS piid='dp1' data="researchGroupAccordion" uid="*" ] replacing the piid=’dp1′ value with that of the group PI
- To show a grouplist with links to a profile page for each:
[SDS_SYMBIOSIS piid='dp1' data="researchGroupList" uid="*" ] replacing the piid=’dp1′ value with that of the group PI
In the second case a profile ‘pro-forma’ page must also be created – see tab 3 for more details
A research collabration where there are several PIs
A list of researchers only, or a complex list with research team members also may be created.
Taking the simple case a shortcode like this can be used to output a group list with portrait images:[SDS_SYMBIOSIS data="grouplistImages" groupcode="IBANSBHAVECO" ] sample output
A profile ‘pro-forma’ page must also be created – see tab 3 for more details.
The groupcode is made by the symbiosis administrator (firstname.lastname@example.org) when the group is first set up. People in the symbiosis dataset may be added to this list. This can include people indifferent schools. Once the group is set up a person in your own team can be given access to maintain the group list.
Individual profile ‘pro-forma’ pages
The (single) pro-form page used to show everyones profile in your site must be titled ‘profile’.
It contains several shortcodes indicating data to be used to make up a profile for any person. For example:[SDS_SYMBIOSIS uid="" data="title" ][SDS_SYMBIOSIS uid="" data="sidebarWithPure" ] [SDS_SYMBIOSIS uid="" data="body" format='headspace' ] sample output (using my ID)
There is an associated URL which may be used by staff to specify their page on your site – in this example it would be:
In fact there is a wide range of shortcodes that may be used on any page to pull in data for an individual or a group for example:[SDS_PURE data="publications" uid="dp1" number="50"] Show most recent 50 publications from PURE (research@st-andrews) for the researcher specified by uid
sample output [SDS_PURE data="overview" uid="dp1" ] Show overview text from PURE (research@st-andrews) for the researcher specified by uid
sample output [SDS_SYMBIOSIS data="image" uid="dp1" ] Show image from symbiosis collection for the person specified by uid [SDS_SYMBIOSIS data="generalText" uid="dp1" ] Output the main text block from Symbiosis profile for the person specified by uid
Note – more detail on various shortcodes available: see here.