Today I discovered the Lazarus component 'projecttemplates'.
It has a lot of potential, but it doesn't quite deliver (yet).
There are a number of open bugreports, the extension exceptions don't work and subdirectories are not supported. Caused by bugs or incomplete function bodies in the source (0.9.27).
The attachment shows suggestions for fixes to get it working.
Furthermore: it would be very helpful if the ProjName property would automatically be replaced in the source files (or by way of a parameter in the Projects.ini file to switch this on and off, to keep it backwards compatible).
At the moment one must manually edit the template files and insert __PROJNAME__ tags in several places. Making it impossible to maintain the templates via the IDE.
For demonstration purposes I've added a function SubstituteProjectReferences that does just that.
(I had to rename the sourcefile because .pp files cannot be uploaded.)
Just my 2 (euro-) cents...