Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
content.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2008 at 14:23 UTC
Updated:
3 Jul 2008 at 02:14 UTC
This may or may not be a bug report, and may or may not be related to Zen. But I thought I'd start here.
Running Drupal 6.2 on FastCGI PHP 5.1.4 with 32 MB memory
CCK 6.x-1.x-dev (2008-May-13)
Zen 6.x-1.x-dev (2008-May-14)
I copied field.tpl.php from sites/all/modules/cck/theme to sites/all/themes/zen/zen
When I make changes to the field.tpl.php file in the zen directory, the changes don't seem to affect the fields in my CCK node displays. Am I missing something obvious? Thanks for all the work done on this theme -- the documentation has been a huge help.
Comments
Comment #1
johnalbinDid you rebuild the theme registry? http://drupal.org/node/173880#theme-registry
Sounds like you didn't. :-)
Also, you might want to review the "Why should you create your theme as a Zen sub-theme as opposed to just modifying Zen directly?" page. http://drupal.org/node/245802
Comment #2
lrickard commentedThanks for your response. According to your suggestions, I did the following:
Made a new sub-theme at sites/all/themes/newsubtheme
(Edited .info file and all other files according to README.txt)
Switched site's theme to newsubtheme
Copied field.tpl.php from cck/theme/ to newsubtheme/
Commented out a large section of newsubtheme/field.tpl.php
Added drupal_rebuild_theme_registry() to my template.php to ensure the theme registry gets rebuilt
Also used devel module's 'Empty cache' function
When I view the node, the changes to field.tpl.php don't seem to take effect. (Editing cck/theme/field.tpl.php definitely takes effect.) (Regardless of whether I get this worked out -- thanks for all your work on Zen, JohnAlbin.)
Comment #3
lrickard commentedPoking around, I tried copying the node.tpl.php file from zen/zen/ to newsubtheme/
When I modified that tpl file, it took effect on regular nodes, but NOT on CCK nodes. Maybe I need to rename my tpl files to specify the CCK node type?
Comment #4
johnalbinFYI, I just modified http://drupal.org/node/173880 because you only need to do 1 of the 3 things it lists to rebuild the theme registry.
Hmm.. I haven't used CCK on D6 yet. Not sure what the problem might be. You might want to ask someone who has used the D6 version of CCK.
Comment #5
a.mikheychik commentedI have the same problem with my own theme.
Seems it's a problem of CCK.
Comment #6
Moonshine commentedThis is actually is a CCK oddity...
"content_field_view" in CCK is defined as follows:
So with this, CCK itself uses "field.tpl.php" for formating, however other themes/modules must use "content-field-view.tpl.php" to overide it. As this is a break in consistancy I'm moving the bug to CCK.
It should just be a relatively simple fix of changing the "template" variable from "field" to "content_field_view" and changing the template filename to content-field-view.tpl.php in CCK. And a flushing of the theme registry of course :)
Comment #7
moshe weitzman commentedThis is a duplicate issue but the proposed solution is here so I leave it open.
Comment #8
yched commentedFixed in latest D6 branch. Requires a theme registry rebuild, of course.
I also changed the name of the template to a simpler 'content-field.tpl.php', more in line with usual core patterns.
Thanks !
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.