Hi,

I created a view in a block. Now, I want to style this block via tpl.php, but I´m totally unable to find out, how the tpl.php has to be named and I tried many variations.

(Of course, I cleared the cache at each try).

The Block has the ID "block-views-blog_style_css_header-block_1"

thanks for any help,
Marc

Comments

matt_harrold’s picture

You might like to read this page: http://www.packtpub.com/article/dynamic-theming-in-drupal6-part1

I'm guessing the template would be block-views-blog_style_css_header-1.tpl.php but you might have to do a bit of trial and error. I've never tried theming a block myself.

Elehas’s picture

I think you have to style the view. If you go into your views and select the one you want in the block, select "theme" under Basic Settings and it will show you the template names you can use.

karc2008’s picture

but I found out, by shortening the blocks-name or better the views name, that gets included in the blocks-name to just one word. Because I never was sure to use underscores or not (and this combined with all the combinations... capek deh!

I wanted to try this because I wanted to get rid of all html of the view and the block, because I wanted to put in a div id="cck-fieldvalue" chosen by the user as an option for different css styles. The Div should have wrapped the whole blog-area.

Well I was nearly done and it would have worked, my problem was just that in the end (5 minutes ago) I couldn´t find a proper place to add the closing "/div". I´m already thinking I won´t put this option in.. capek deh lagi.

All I was able to do is that people can put their own header-pic above their blog. At least a bit individual styling. This was really easy and I didn´t need any extra tpls for that.

thanks for your efforts,
Marc *smokes cigarette*