Hello, and welcome, A.Mason;
you do it the wrong way, using the templates files. Templates are just a cosmetic display of the script.
You will have to use a few functions of the script to show categories in every page.
The bes way would be to use a tree showing a sitemap of your categories and sub-categories.
Have a look at here, please:
[MOD] Sitemap v1.0These modifications require editing essential core script PHP files. Be sure to backup all your work before making any change.
If you need some help, you'll better find it in the forum
Mods & Plugins (Requests & Discussions). Open a new thread and you will soon have answers and help.