Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(for technical specifics on how these work please see: /wiki/spaces/TD/pages/12452336)

Staff lists are lists of staff pages in different formats. There are two different kinds of staff listings:

  1. using [stafflist] and [/stafflist] to generate a list in the new responsive format
  2. using {begin stafflist} and {end stafflist} to generate a list in the old template format

An example of 1 would be is   http://www.victoria.ac.nz/about/governance/academic/staff/

 

An example of 2 would be is http://www.victoria.ac.nz/psyc/about/staff

...

Code Block
languagetext
[stafflist]
emailaddress1@vuw.ac.nz
emailaddress2@vuw.ac.nz
[/stafflist] 

Note, each email address must be on a newline or it will not work.

Make sure you also apply the paint layout "Staff List Layout (Id: #239315)" to the page the stafflist is on.

 

This will return the contact details and picture card of the staff member who has that email address.

If the email address doesn't match anything in the existing database, it will simply be removed and ignored.


This format of stafflist also allows for the values displayed to be overwritten.

Code Block
{ "Name": "REPLACED NAME", "Biography": "REPLACED BIOGRAPHY", "Job_Title": "REPLACED JOB_TITLE", "Organization_Unit": "REPLACED ORGANIZATION_UNIT", "Email": "REPLACED EMAIL", "Office_Phone": "REPLACED OFFICE_PHONE", "Mobile_Phone": "REPLACED MOBILE_PHONE", "Nearest_Fax": "REPLACED NEAREST_FAX", "Read_More_URL": "REPLACED READ_MORE_URL", "

...

Photo_URL": "http://www.victoria.ac.nz/assets/images/print-logo.png", "

...

Research_

...

Interests": "REPLACED RESEARCH_INTERESTS", "

...

Room": "REPLACED ROOM", "

...

Street_Address":

...

If the email address doesn't match anything in the existing database, it will simply be removed and ignored. ensure email addresses and overriding values are spelt correctly.

TODO How are multiple roles handled here?

...

 "REPLACED STREET_ADDRESS" }

 

See the image below for an idea of what the different sections refer to.

Image Added

 

For Name/Read_More_URL - The Name is the text value that is displayed, the URL is where it will redirect the user to if they click on it.

 

Multiple Roles:

I haven't had a chance to test this thoroughly yet, however it seems If a staff member has multiple roles/listings in the database, the stafflist will only use one result. The one it uses seems to be the first result that gets returned when you do a search for a person under "people".

 

If the overrides are not working:

Make sure that the Value Name and Replacement Value are in speech marks.

Good:

"Name": "New Name"

Bad:

ValuesReason
"Name :" "New Name"" after :
Name: New NameNo "
"Name: New Name"Missing " before and after :
"Name': 'New Name" 

Started with " but used ' before :

" must match

 

Type 2

The old style of stafflists are still used on the older versions of sites.

To include, simply add the following content:

Code Block
{begin stafflist} emailaddress1@vuw.ac.nz emailaddress2@vuw.ac.nz {end stafflist}

Note: email addresses do not have to be separated by a newline, but there must be a space between each of them.

The page must also have a paint layout applied to it:

  • if the stafflist is under a subsite use Staff List (Id: #8769) paint layout
  • if the stafflist is not under a subsite use Staff List - no subsite (Id: #146518) paint layout

 

 

Multiple Roles

 

So, here's where it gets a bit complicated. If you use a stafflist under a subsite (for example psyc), then it is called and the roles returned will be only those related to that subsite. If a user has multiple roles and a subsite isn't specified, then no values will be returned for that email. HOWEVER, if a stafflist is used where there is not specific subsite set, then all roles for that person will be returned.

Troubleshooting

If a person is not appearing in a stafflist, or a person is appearing multiple times:

  • Ensure that the person is correctly associated with that site (in the staff directory).
  • Check that the 'Site href' metadata value is correct for the site that it is on. (The "Site href" value in the sites metadata page)
  • Ensure the staff page has the correct paint layout applied to it. (Under Lookup Settings, should be linked to "Staff List (Id: #8769)" if it is a subsite, or " Staff List - no subsite (Id: #146518)" if there is no specific subsite for this list)

Advanced Testing

You can see exactly what will be returned for a stafflist here: http://www.victoria.ac.nz/webstruxure/dotnet2/VUWcc.asmx?op=StaffList

Note, if showduplicates is set to false, you must specify a subsite otherwise someone with multiple roles will not return anything.