On my website, I have used the Taxonomy to created different sections. Each section has its own "contact us" page. I want to create a variable that will create a path to the relevant contact page. That way I can print the variable in taxonomy-term.tpl.php, node.tpl.php and page.tpl.php files to print the path dynamically.
How can I test for the taxonomy, and then change the value of the variable accordingly?
I've looked around for an answer and the closest I could find was How to move custom code into template.php. However, it requires a taxonomy reference field to present to perform the test and so wont work on the main taxonomy index pages (which cannot have taxonomy field references).
EDIT: Please note: The contact us page is just a normal node with telephone numbers on it. It is not the Drupal contact us form.