Well I'm not even sure if this is a Content Profile bug or a Drupal bug, or... my own stupidity.
I want to theme the way that the profile is displayed by content profile. So (if i got the D6 way right) i just have to copy the content_profile-display-view.tpl.php template file from the modules directory into the theme's directory, then customize it, do a 'clear cache', and, voila!, D6 uses my customized template to display the information. And it worked like a charm! Until i hit refresh...
It seamed that the data (the profile nodes) displayed only after a 'clear cache'. If i hit refresh they don't show.
I figured out that... the function <?php function template_preprocess_content_profile_display_view(&$variables) ?> found in content_profile.theme.inc is not being called unless.. i do a 'clear cache'. I don't know why... Haven't had the time to find out, or test more.
I temporarly solved my problem by also implementing the preprocess hook in the themes template.php file, and it seems to work for now. (I copied the function from content_profile.theme.inc to template.php and renamed it to phptemplate_preprocess_content_profile_display_view).
I think it should have worked without the need to copy this function to 'template.php' (redundancy), so this is clearly a bug. But i don't know if it's a Content Profile bug, a D6 bug, or just a bug on my brain...
If I'll have the time I'll further investigate this. In the meantime maybe one of you will find interest in this problem.
Thanks and good luck!
Comments
Comment #1
DizzyC commentedWell it seams the workaround did not work.
I found out what actually happens is that the first content type simply does not load.
I got two contet types for my profile, but if i use a custom content_profile-display-view.tpl.php, in my themes directory, the first content type just doesen't load when i'm viewing the profile.
The only way it worked was when i replaced the original content_profile-display-view.tpl.php from the module directory with my custom one. But this is no solution. It's not the way it should work.
Comment #2
fagoplease also see http://drupal.org/node/302873