I'm working on some custom templates for a page created by Views and I'm struggling to understand why it's using block.tpl (which I thought was used for blocks). Basically I'm trying to get rid of all the extra divs created for just this one particular page, and until I remove the div class content I can't get the desired style I'm looking for.

I did something similar for a block generated by views and used the template name block--view-name.tpl and got the desired effect. I ended up copying that same template file and just called it block.tpl and got the deserved effect on this Views page.

Now I'm left scratching my head as to why this Views page is listening to block.tpl when it's not a block. Also, seeing as it apparently wants a block template to do what I want, I'm trying to figure out the template naming but none of the usual tools are helping (theme developer module, the theme information under the advanced tab when editing the view).

Does anyone know why a page generated by views would be listening to block.tpl? If it helps the view content on the page is being wrapped by the following div:

<div id="block-system-main" class="class="block block-system"></div>

2 Answers 2


That block is the main content block.

<div id="block-system-main" class="class="block block-system"></div>

It is provided by the system module and is the default content area block in the page template.

More information:

  1. system_block_info ( delta is "main" )
  2. system_block_view
  • Ah I see, well that at least clears up the first part. Do you know how I would go about figuring out naming a custom block template for that page? The theming information provided by the View settings doesn't offer any suggestion for a block template and I've tried every possible name I can think of. Jan 18, 2013 at 16:40

In Drupal 7 the main page content was turned into a block that could be positioned with the block module. Problem is I don't think people have many use cases for that functionality.

You can get rid of that ugly #block-system-main div by doing the following:

  1. Add a template to your theme called block--system--main.tpl.php

  2. Print ONLY the content within that block template: <?php print $content; ?>

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.