Drupal 6.9 and Views 2.2. I'm going to go nuts. Two days now, a site presentation on Tuesday, and I can't get anywhere with Views.

So, I have a store and have a Vocab called 'Brands' and the name of my view is "brands_view". It shows a grid (grid view with row fields) of products by Brand Name (which is of course a Taxonomy Term). The View works after creating it in the Views UI. It looks like crap, so I want to do a lot of theming to it.

I want to put the label "by " in front of my Brand Name, so my products all say "Product Name by Brand Name".

I go into Views for "brands_view".

Using Theme Information, it offered:

views-view-field--brands-view--default--tid.tpl.php

... which I created in themes/bluemarine - the theme i'm using for testing - and yes, in both admin and production - because Theme Information only works against the admin theme - so you want to change your admin theme to match your prod theme whe using Theme Information.

I did a Template File Rescan and my file is now in bold.

I did a Preview - it works! I thought I had it!

I went to an actual brands_view page, but the changes are not there.

I use devel.module and hit Empty Cache. <-as I understand, this clears the Theme Registry.

I switched Themes back and forth to clear the Registry.

I cleared Views cache.

Nothing I do makes the view change appearance. I tried this again on field templates for two other Views, and I get the same thing:

- Views "scans" and finds my custom template files. (tpl.php)
- Preview shows my desired output as coded in my tpl.php file
- Empty cache and empty it again
- No change to the Views page. It's the same as it was when I first created the view.

I even tried putting ALL the tpl.php files Views mentions, into the bluemarine folder, emptied cache, etc. Still nothing.

Am I missing a key piece here? Preview works great, but my file changes are not showing up on my live site.

Just to be thorough, I create template files in my theme folder for the view, the grid, the fields and of course the field I'm trying to override. Views see my template files. Preview works.

Go to my view and nothing has changed. I enable Themer Info (devel.module). I click on a box in my view ... it's still getting info from the sites/all/modules/views/theme folder, NOT my theme folder.

I go to the Theme Registry path offered by devel.module.

I clearly see my "custom" template files in the registry array. So, my files are in the registry, but the actual View is still not using those files!

Any ideas?

I'm getting desperate.

Comments

dnewkerk’s picture

Can't answer in detail now as I'm on my iPhone. However I think you are using the template file name that is specific to the default views display. Either use one for the Page display or a general one that applies to all displays. Also check my tracker for a recent post about "views performance" where I wrote about my preferred views theming method.

-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides

dnewkerk’s picture

ccshannon’s picture

Yes, thank you thank you thank you. Merlin Of Chaos on an Issues thread, told me the same thing.

Taking out '--default' from the filename, fixed the problem. I knew it had to be something right in front of me.

Very much appreciated. Thanks!

It's like the sun just came out. I feel so much less stress now, it is unreal.

Thanks again!

-C

lancsDavid’s picture

i just did the same thing

( fortunately this post was here to save my ass )

Automatically’s picture

I have been searching the forum for 3 days. Finally, some lads with the same weird things going on...

Now I can move forward:)

Thanks a lot, guys!