Currently i have a view with the name:

name (String, 21 characters ) home_slideshow_mobile

At the same time this view content is displayed inside a block, which filename (tpl.php) should it have my template file to rewrite the content of this view?

Thanks a lot :)


You can have multiple templates for views like :


if your display is a block, you can write it like this :


then you have templates for views fields :


Templates for views format (like unformatted for example) :


If you want to alter the template of your block, you can declare a block.tpl.php like :


You can check all views template in the module views (in like sites/all/contrib/views/theme/...). You can copy the template and paste them in your theme and rename it to target your specific view.

| improve this answer | |
  • What if instead of unformatted be an html list? which would be the name? – martinezjc Sep 24 '15 at 16:36
  • It would be html-list instead of unformatted I guess. I'm glad that worked for you ;-) – pbonnefoi Sep 24 '15 at 16:45


See the suggestion for views templates.

If You calling a view block in your custom tpl.php use echo views_embed_view('view_machine_name', 'block_1'); You can find out the display name by clicking the tab and check its name in the address bar of your browser: "#views-tab-block_1" gives you "block_1'.

| improve this answer | |

In your views, you can get a theme suggestions by clicking Theme: information under Advanced settings of your view. It gives you suggestion for every field, view style etc.

| improve this answer | |

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.