Find out if you're viewing a taxonomy page
When a taxonomy page is rendered, the template file used is taxonomy-term.tpl.php that receives, among other variables, the $term variable, which contains the term object for the taxonomy term associated to those nodes.
Basing on the vocabulary that owns that taxonomy term, you can change the layout of the page.

If you want to find out in page.tpl.php the taxonomy term associated with the nodes shown in the page (where the page's URL is example.com/taxonomy/term/[tid]), then you can use the following code:

$term = menu_get_object('taxonomy_term', 2);


If the page's URL is not example.com/taxonomy/term/[tid], then the function returns FALSE. The code can also be executed in a preprocess function, such as hook_preprocess_page().