Modifying Contribution and Event Templates
You're looking for the Confirm and ThankYou templates - they live here - for Contribution pages (and tree structure is very similar for Event):



Two options to override them:


add a custom_templates directory in the System Settings -> Directories - mimic this entire three.
or yes put it into your extension! I like that option better as I tend to forget about custom_php and custom_tpl when I upgrade sites. Same thing - in your extension -> copy the entire tree starting with templates - of course rename everything. Perhaps you already used civix to create your extension? Then you should already have a templates/ directory ready to be used!