Theming the fields wrapper, theme_content_field_wrapper missing?
gnucifer - November 8, 2009 - 13:24
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.5 |
| Component: | General |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi! I'm in need of adding some classes to the fields wrapper. In function 'content_field' there is a reference to 'theme_content_field_wrapper', but no such function seams to exist. If there indeed was a theme-function for the wrapper form element, then my problem would be solved. Can this be fixed?

#1
True, that function does not exist. The comment about 'theme_content_field_wrapper' is wrong. However, this is stuff related to node view, not related to node edit form.
If you want to work with the form element of fields, then you need to start from your own implementation of hook_form_alter(), and maybe then attach your own #pre_render callbacks.
If you need to work with fields in the node view, then... there are several ways to alter the output. One is from your own implementation of nodeapi('view'), and maybe then attach your own #pre_render callbacks. Or you could also implement MODULE_preprocess_content_field, see content_preprocess_content_field() in content.module. Or you could override theme functions. Or you could create your own CCK field formatters.
#2
Thanks for the prompt reply! I will look in to the alternatives, but I managed to find a workaround by rendering the items separately excluding the wrapper (only outputing the markup returned by formatter). Needed control over wrapper div when inserting images in node body. (Two unreleased modules of my own, cck tokenizer module in combination with a module allowing you to use tokens in node body and teaser). I added a "no-wrap" token for situations like this.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.