attributes passed to templates working