Hi,

I wonder if anyone can help me. I am trying to override the imageformatter.tpl.php file within my theme, simply to add some contaner and layout divs, but seem to be having problems. I have copied the imageformatter.tpl.php file into my theme directory, and refreshed the cache ( in fact all caches!) but the new tpl.php file does not seem to take.

I realise you say on the module page you state "Fully themeable through tpl file, overriding the template_preprocess, or just CSS. You should know what you are doing if you do so.", however I beleived I did know quite alot about the theming system! Indeed I am able to override the preprocess function with ease and add variables I require. I just seem to be help up with overiding the tpl.php file.

For now I'm hacking the modules template file, but if anyone can look into this or suggest what I've missed I'd appreciate any assistance...

Thanks in advance,

ZuluWarrior

Comments

ZuluWarrior’s picture

Status: Active » Closed (works as designed)

Well, would you even beleive it! I spent a good few hours playing around and sods law, only when I decide to post a comment about it do I manage to fix it.

I naively thought copying the tpl file would be enougth, but of course to override the default "no style" style, it must be renamed to : galleryformatter_formatter_galleryformatter_default.tpl.php

Once renamed and cache cleared and it works as expected!

Thanks, sorry to bother you with a non-issue, but heres hoping this helps someone...

Kind Regards,

ZuluWarrior

sydneyshan’s picture

Thanks, ZuluWarrior - I would have never guessed this in a million years...

Shan

manuel garcia’s picture

Status: Closed (works as designed) » Active

Thanks ZuluWarrior for leting evryone know.

I'm not sure this is a bug in CCK theme's system or what, but This should be documented. I'll leave this active so people can perhaps find it easier for now.

aaronbauman’s picture

Version: 6.x-1.0-rc3 » 6.x-1.x-dev
Component: Code » Documentation
Category: support » bug
Status: Active » Needs review

Just ran into this myself, and fix described in comment #1 works.
I updated Gallery Formatter README.txt to reflect this quirk.
Re-categorized as a documentation bug.

manuel garcia’s picture

Thanks aaronbauman

Anonymous’s picture

To be able to override the theme in views, use the same naming convention: galleryformatter.tpl.php

laurasmithwalker’s picture

Category: bug » task

I've copied the galleryformatter.tpl.php file into my theme directory (/artist) and renamed it galleryformatter_formatter_galleryformatter_default.tpl. I made my changes and cleared the caches but nothing happens. Am I missing something?

pacome’s picture

For Drupal 7, copy galleryformatter.tpl.php in your custom drupal theme folder, and do not rename it.
-p-

manuel garcia’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)