Using real fk attributes in templates. refs #478