You should also set this variable in the controller or make it a method in the adventure class.  In general don't set variables in the template.