Drupal: view titles

I have a view that displays a page. In the "Basic Settings" section, I set the "title". When I load the page, I see this title as the page title (at the top of the browser) - everything is fine.

How can I print this value in the "Display output" .tpl file? The $ title variable doesn't matter here. Do I need to use a preprocess function?

thank

+2


source to share


3 answers


Does it work drupal_get_title()

?



+3


source


Full view details can be obtained using

You can get the name of all files displayed there



$view2=views_get_current_view();
$view2->display['default']->display_options['title'];

      

+1


source


If you just want to print the title, you don't need to write a .tpl file.

In the views you will find the title area and there you can add the global text and using that you can add the title text there.

+1


source







All Articles