Allow customised declarations for generated templates