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
Comment #1
ZuluWarrior commentedWell, 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
Comment #2
sydneyshan commentedThanks, ZuluWarrior - I would have never guessed this in a million years...
Shan
Comment #3
manuel garcia commentedThanks 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.
Comment #4
aaronbaumanJust 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.
Comment #5
manuel garcia commentedThanks aaronbauman
Comment #6
Anonymous (not verified) commentedTo be able to override the theme in views, use the same naming convention: galleryformatter.tpl.php
Comment #7
laurasmithwalker commentedI'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?
Comment #8
pacome commentedFor Drupal 7, copy galleryformatter.tpl.php in your custom drupal theme folder, and do not rename it.
-p-
Comment #9
manuel garcia commented