1

I embed a view in a .tpl file but it doesn't show the title. It only shows the content.

How to render the title of the view?

I'm using the code below:

<?php
print views_embed_view('dummy');
?> 

1 Answer 1

2

Try following way :

$view = views_get_view('view_name');
$view->set_display('display_id');
print $view->get_title();
print $view->preview('display_id');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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