Doxygen does not support something like HTML templates out of the box, as far as I know. You can refer to the image below (from the official doxygen homepageofficial doxygen homepage). It shows the input and output files that are related into the entire documentation creation workflow.

As you can see, doxygen reads a so called "Layout file". This file can be customizedcan be customized! However you are somehow restricted to the page structure, doxygen creates.
If you need more flexibility you should prefer to XSLT transform XML outputto XSLT transform XML output. There is also an sample that shows you how to do this.