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, set the onCourseOption setting in the Config section of the XShowSchedule.htm template.
Available Settings ​
Available settings for the oneCourseOption:
- 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],htwrap("This is currently the only course that matches your selection.","p"),[])##
Group Listing:
##IIF(Request.Querystring([DirectFrom])=[Schedule],htwrap("This is currently the only course in the group you selected.","p"),[])##