Pass these to the template explicitly, rather than checking the query string directly.  Better template code, more flexible approach