If someone clicks on a taxonomy term they land on a page showing all the content tagged with that term. The title on those pages is simply the taxonomy term. I thought it would be more usable if I changed the verbiage of the title to let the user know what they are viewing. This code snippet shows how you can change the title for the taxonomy term landing pages:
<?php
function MYTHEME_preprocess_page(&$variables) {
if (arg(0)=='taxonomy' && arg(1)=='term') {
$variables['title'] = "Content tagged with: " . $variables['title'];
}
}
?>










Perfect
This was exactly what I was trying to figure out how to do. I'm still learning how to use the preprocess functions and this was a great example of how to make a simple customization. Thanks!
Nice
This looks like just what i need. I tried to copy it into page and template files and it did not work. Should I be copying it somewhere else? Cheers, Kevin
did you...
Did you flush your cache (and/or your theme registry)? You can clear all your cached data here: admin/settings/performance.
Also, did you replace "MYTHEME" with the name of your theme?
Hope this helps,
Eric