Pass the query back as a template variable.