I posted this under another thread of mine but I think it got lost since my initial question was answered and this wasn't seen below.

I am trying to theme a view and while I understand the block--{module}--{delta}.tpl.php thing now but I have issues with applying a theme for a view at the block level.

What I mean is that I want to customize the outer block and not the view itself.

View Name: Recent Articles
Display: Block

Under blocks, the configure link is admin/structure/block/manage/views/recent_articles-block/configure

Naturally I think block--{module}--{delta}.tpl.php should be block--views--recent_articles-block.tpl.php but that doesn't work. I also tried themer which told me block__views__recent_articles-block.tpl.php which I suspect is a bug since it's still in dev mode and "__" should be "--" but tried both anyway.

I've tried these and nothing seems to apply.

block__views__recent_articles-block.tpl.php
block--views--recent_articles-block.tpl.php
block--views--recent-articles-block.tpl.php
block--views--recent_articles.tpl.php
block--views--recent-articles.tpl.php
block--views--view-recent-articles.tpl.php
block--views--view-recent_articles.tpl.php
block--views--view-recent-articles-block.tpl.php
block--views--view-recent_articles-block.tpl.php

I tried various views-view templates which don't give me the effect I'm looking for since that alters the view and not the block. What I mean by that is I want to add a class to the block div, I can't restyle a currently applied class, I need to add one.

<div id="block-views-recent-articles-block" class="block block-views first odd">
  <h2 class="block-title">Recent Articles</h2>
  <div class="content">
    <div class="view view-recent-articles view-id-recent_articles view-display-id-block view-dom-id-1">
      <div class="view-content">
        ...
      </div>
    </div>
  </div>
</div>

I need to alter the div with the ID block-views-recent-articles-block to add a class to it to have it apply a 960 position/size to it.

Any thoughts on this? Spent hours trying things. Frustrating.

Any help is appreciated and don't hesitate to ask for other details.

Comments

dalehgeist’s picture

+1

espurnes’s picture

if your block ID is "block-views-recent-articles-block-1" try the name

block--views--recent-articles-block-1.tpl.php

it works in my drupal 7