passing in correct variables to items template