Theme override for a node content type???

tflmike - July 14, 2008 - 17:24

Is it possible to write a theme override for a node content type in template.php?

I was trying to use theme_node_contenttype() but it didn't work... I know I can make a template using node-content_type.tpl.php, but I'm trying to figure out how I can affect the $node->body output so it'll only show the $body field and not add in all my other CCK fields.

Thanks for your thoughts!

Try ConTemplate. You can

Deeporange1 - July 14, 2008 - 17:53

Try ConTemplate. You can find it Here

Regards, Derek
http://collectivecolors.com

Contemplate only works for

tflmike - July 14, 2008 - 18:03

Contemplate only works for CCK fields. I'm trying to separate the body field from the other fields in $node.

So when I use <?php print $node->body ?> I get all the fields combined together. When I use <?php print $node->content['body']['#value'] ?> I get the individual body field but it doesn't include my inline image. So I need to somehow remove the other fields from $body... that's why I was wondering if you can actually affect the node's output of the $body variable by using a function that would override the node content type.

Is your inline image

Deeporange1 - July 14, 2008 - 18:34

Is your inline image available to ConTemplate? If so, just put together a template that uses it and the $node->content['body']['#value'].

Regards Derek
http://collectivecolors.com

 
 

Drupal is a registered trademark of Dries Buytaert.