I have a view which overrides the default taxonomy page. The view has a contextual filter which look for the tid in the URL.
My goal is to get the taxonomy term to display as the title of the page.
I tried setting the view's title to "Department: [field_dept]" (the field which references the taxonomy term and is loaded in the view). This work great, [field_dept] is replaced with the taxonomy term as expected.
There is an exception though. When the view has no results, there is no [field_dept] to look up and my page title looks like this "Department: [field_dept]" :-/
Now I'm trying to figure out how to get the taxonomy term from the tid, which is in the URL and available in my view.
Is there a function available in views that will return the term from a tid? Something like get_term_from_tid(%1), so I can use it in the title of the view or via title override in the contextual filter?
Drupal 7.14
Views 7.x-3.3