Apply Sort to Search Template