I'm using drupal 7 with views and panels modules with my own very simple theme that only has mytheme.info and a css file in the sites/all/themes/mytheme directory.

I created a new views-view--myview.tpl.php file in the theme folder and then clicked "Rescan template files" in the view theming information window. This template becomes bolded indicating that it is recognized by drupal.

My problem is: none of the content in the views-view--myview.tpl.php are reflected in the actual output (when opening a page with this view)!

I've found similar looking questions here but in many of them the problem was that the new .tpl.php file wasn't in the theme folder. In my case it is and it's still not working. Could anyone give an advice on how to solve this?

  • Are you sure it's working, have you tried just printing some text in the template just to confirm? – Alex Gill Jul 11 '12 at 8:49
  • Yes, the .tpl.php contains <H1>TEST</H1> but that isn't outputted to the page source... I've also cleared all caches but to no avail. To explain the situation further: I've also tried creating a views-view.tpl.php -file in my theme folder and this template file is recognized – Remolod Domelor Jul 11 '12 at 8:51
  • Is the view a block or a page? If a block, have it been assigned to the layout? If a page, have you checked the path is correct? – Alex Gill Jul 11 '12 at 9:00
  • The view is a block. I have added it to a panels page where its contents are showing as expected. – Remolod Domelor Jul 11 '12 at 9:26
  • 1
    Because when you setup your view, it put references of the machine name in the database so not usually a good idea to change it. – Alex Gill Jul 12 '12 at 8:43

Your Answer

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

Browse other questions tagged or ask your own question.