Last active
December 11, 2015 17:39
-
-
Save jonwilcox/4636423 to your computer and use it in GitHub Desktop.
Office Hours in Profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Your profile type editor should include custom fields similar to this | |
Monday Office Hours -> text (one line) | |
ID: profiles_4 | |
Tuesday Office Hours -> text (one line) | |
ID: profiles_5 | |
Wednesday Office Hours -> text (one line) | |
ID: profiles_6 | |
Thursday Office Hours -> text (one line) | |
ID: profiles_7 | |
Friday Office Hours -> text (one line) | |
ID: profiles_8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Below assumes a Profile Type with fields set up as above. | |
// Profile IDs will need to be adjusted based on actual field IDs. | |
// Place this code in profiles.php where you want the table to appear. | |
<xphp content="true" ifmode="or"> | |
<if var="profiles_4"/> | |
<if var="profiles_5"/> | |
<if var="profiles_6"/> | |
<if var="profiles_7"/> | |
<if var="profiles_8"/> | |
<content> | |
<div class="office-hours"> | |
<table> | |
<caption>Office Hours</caption> | |
<thead> | |
<tr> | |
<th>Monday</th> | |
<th>Tuesday</th> | |
<th>Wednesday</th> | |
<th>Thursday</th> | |
<th>Friday</th> | |
</tr> | |
</thead> | |
<tr> | |
<td><xphp var="profiles_4" inner="true" /></td> | |
<td><xphp var="profiles_5" inner="true" /></td> | |
<td><xphp var="profiles_6" inner="true" /></td> | |
<td><xphp var="profiles_7" inner="true" /></td> | |
<td><xphp var="profiles_8" inner="true" /></td> | |
</tr> | |
</table> | |
</div> | |
</content> | |
</xphp> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment