use the same template logic for apps as for plugins