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.
- Add five custom fields to your profile type - one for each day’s office hours. Make note of the custom fields’ IDs.
- 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 firstname.lastname@example.org.