Direct-to-Course Feature
The Direct-to-Course feature will send the user directly to a course information page if only 1 course matches the user's search query, or only 1 course is in the group the user selects.
To enable this option, add a Config section to the XShowSchedule.htm template below the closing </html> tag, with the appropriate oneCourseOption set (where X is the one of the settings listed below):
##-Config-##
<oneCourseOption>X</oneCourseOption>
##-/Config-##
Available oneCourseOption Settings:
0= | Display search/group listing results using the ScheduleFields listing (current behavior). |
1= | Search Results: go directly to course information page if only 1 course matches search query. |
2= | Search Results--AND--Group Listing: go directly to course information page if only 1 course matches search query or only 1 course is in the selected group. |
Note: if using the Unscheduled Courses option, if there are no scheduled courses meeting the criteria but there is at least 1 unscheduled course, the regular ScheduleFields listing opens to display the Not Currently Scheduled explanation to the user:
Direct-to-Course Message
You can also display a message on the course information page letting the user know that this is the only course meeting the search query or in the group by adding the following expressions to XCourseStatus.htm:
Search Results:
##IIF(Request.Querystring([DirectFrom])=[Search],[<p>This is currently the only course that matches your selection.</p>],[])##
Group Listing:
##IIF(Request.Querystring([DirectFrom])=[Schedule],[<p>This is currently the only course in the group you selected.]+Request.Querystring([Origin])+[</p>],[])##