Having logic about what source the course came from in the template isn't really the right place for this in the code. It should be a rule inside the application that implements this and the template should just process simple statuses (eg if (waitingListAvailable)... ).