Add missing foundation template code