Office Hours in a Profile

Add a table of “office hours” to a faculty/staff profile template using conditional XPHP. The table will only appear if any hours are filled in, but will not appear at all if none are specified.

Here’s how:

  1. Add five custom fields to your profile type - one for each day’s office hours. Make note of the custom fields’ IDs.
  2. Use conditional XPHP markup in your profiles details template to check for the presence of any of the 5 fields, and output a table if so.

Important - In order to utilize the XPHP OR attribute shown in the Gist, you will need the latest update of White Whale’s open source XPHP templating module. To check if you have it, or get it if you don’t, simply email support@livewhale.net.