Hello, fellows!
I looked for a answer to this problem here in drupal.org as well as in the brazilian community where I am frequently contributing, but I had no answer.
Basically what I have to do is to hide the body field when I am showing a node of a specific node type.
The site I'm building is a image gallery made with imagecache, imagefield and views. I created a preset called thumbnail, to be shown in the gallery and another preset called nodeimage, which fits in size with the page, to be shown within the node.
I want my custom content type nodes 'photo' to show only the nodeimage preset image. WITHOUT showing the body or any other information.
I'll put the body in another part of the page, using
<?php print $node->body; ?> within my page.tpl.php file.
The best would be if someone knew the variable that 'prints' the imagefield of the node, like $node->body does with the body. If I knew this variable I could create a conditional similar to this in my node.tp.php file:
<?php if($node->type == "photo") { ?>
<?php print $variavel_do_imagefield; ?>
<?php } else { ?>
<?php print $content; } ?>
I think the $content variable is no good for me in this case, since it returns the whole node content, including body, image and others.
If there is no variable that returns just the imagefield, or a specific preset image of a node, it would be nice if someone knew at least how to hide the body field of my nodes.
Thanks!!
Comments
Comment #1
haraldessert commentedI've already tried the CCK Field Permissions module. But since it just lets you hide the cck fields, it's also no use.
Harald
Comment #2
abbycoo commentedI desperately need hide Body field for Image type, too!
Comment #3
ainigma32 commentedGlad to see you got it fixed: http://drupal.org/node/323586
- Arie