I have a Taxonomy Vocabulary as People. In it there are two terms Board and Staff. I've created a view with two displays, to display the people content with respect to taxonomy terms. The view title is Board Members.

I want to change the staff display title to be like Staff Members? How to change it?

I've filtered by using Contextual filters.

  • Do you use 2 page displays for this view? – Gladiator Oct 25 '13 at 7:19
  • Yes two pages with single view – Dhinesh Oct 25 '13 at 7:22
  1. In the contextual filters click on override title and set it to %1
  2. Specify validation criteria to taxonomy term and select the vocabulary
  3. Leave the views title empty.

This will set the present's term's title as the view's title.

If need you can add "text" %1 to display the text appended to the term's name.

  • 1
    Don't forget to make sure he will overwrte defaults, not update them. If he will update them, he will end up with both displays titled "Staff Members" – Mołot Oct 25 '13 at 7:30
  • 1
    @dinesh : "Yes two pages with single view", the pages are called as displays in views. – Gladiator Oct 25 '13 at 8:05
  • 1
    Did you try the one here drupal.stackexchange.com/questions/11760/dynamic-views-title – Gladiator Oct 25 '13 at 8:11
  • 1
    Thnaks @Gladiator I did little more work to got the result. 1.I left the view display name as blank. 2.In contextual filter, under When the filter value IS in the URL or a default is provided, checked override title, and placed %1. this gives me the terms as titles as board and staff. So i changed the term names (Board Members and Staff Members) add changed the alias and done! – Dhinesh Oct 25 '13 at 8:53
  • 1
    Hello again, guys :) Could you please edit what you figured in comments, @Dhinesh to a question and Gladiator to an answer, respectively? You know, for future readers. – Mołot Oct 25 '13 at 9:03

Another method add this code in the template.php

    function template_preprocess_page(&$variables) {
      $current_path = drupal_get_path_alias();
       if($current_path == 'people/staff') {
       drupal_set_title('Staff Members');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.