Calorimetric insights into the synthesis of templated materials