drupal-7drupal-themingdrupal-templates

Drupal: get page name from view.tpl


I would like to get the current page title from a embedded view tpl. I tried to get the $nid and arg(1), but nothing seems to work.

Using drupal 7


Solution

  • You can use views_get_page_view() which returns a View object. Then you can extract page name through following: $views_page->name