- i am using the zen theme, drupal 6, cck rc4.
- i have double-triple checked that the file is named exactly as suggested (copied and pasted an double triple checked)
- i have tried moving the file from my sub-theme folder to the zen theme folder then outside the theme folder...
- i have emptied the cache through the devel module sidebar, and also /admin/settings/performance
- i have edited and saved the content to double trip check...
but it just won't allow me to override this template.
Themer Info tells me I have a Template called:
content-field.tpl.php
File used:
sites/all/modules/cck/theme/content-field.tpl.php
Candidate template files:
content-field-field_image-project.tpl.php < content-field-project.tpl.php < content-field-field_image.tpl.php < content-field.tpl.php < content-field.tpl.php
i tried creating the
content-field-field_image-project.tpl.php
and also tried
content-field-field_image.tpl.php
... and did all the things listed above...
what am i misunderstanding? is it not supposed to work the way i expect?
is there a secret hidden step?
Comments
Comment #1
yched CreditAttribution: yched commentedIn order for your template variant to be found, both the original content-field.tpl.php and your content-field-field_image.tpl.php variant have to be present in your theme's directory - not *just* the variant.
Comment #2
heather CreditAttribution: heather commentedthank you yched! that is exactly what I needed!!
works a charm now.
how was i supposed to know to do that?
i think the README.txt is a bit obtuse and even vague.
That's a double negative. They should be avoided like the plague of instructional text. And it doesn't say where it should 'be present'... if my module is uploaded, then the file is *present*?
How about something more pithy and clear:
not sure if it's a bug report, but i think it would be good to be fixed...
Comment #3
yched CreditAttribution: yched commentedYou're probably right.
I changed that part of the README to use the 'official' terminology (base tempate / suggestions), and added a reference to the theming handbook page about suggestions (http://drupal.org/node/223440)
Comment #4
hass CreditAttribution: hass commentedCouldn't we change the suggestion here? I don't know why the content-field.tpl.php from the module is not used... but I think it should fallback to the module file if a theme override is not found. This sounds not very logic as it is written everywhere that we only need to place template files in the theme for things we'd like to override!?
Comment #5
yched CreditAttribution: yched commentedThis is not in our hands. This is the way core theming works, nothing cck can do about it. See http://drupal.org/node/279573
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
ressa CreditAttribution: ressa commentedI was going crazy over this too, thank you for the help yched.
Comment #8
StephenRobinson CreditAttribution: StephenRobinson commentedHi,
I am using taxonomy acces control with a custom page called group page. I am trying to make a tpl file to change the list of allowed taxonomies for the role/user, has anyone tried this with CCK?
I have a CCK type group_page which has a select list field called edit-taxonomy-1
I am trying tpl files like content-field-edit-taxonomy-1.tpl.php content-field-edit-taxonomy-1-group_page.tpl.php and nothing works, no cache or copying content-field.tpl.php issues.
Comment #9
StephenRobinson CreditAttribution: StephenRobinson commentedI used function mytheme_taxonomy_term_select($element), as I couldnt get content-field-edit-taxonomy-1.tpl.php to work,
Stephen :)
Comment #10
davidgeilfus CreditAttribution: davidgeilfus commentedHello,
I encounter the same problem: I have copied content-field.tpl.php to my theme folder, duplicated and renamed it to content-field-field_project_date_value.tpl.php to theme the field_project_date_value field, but it doesn't work.
I have cleared all caches but it doesn't seem to be the problem.
Thank you in advance!
David