Community & Support

Node Module for a content type with CCK fields

Hi All,

I spent alot to time in writing a node module (properties.module) that can work with a content type (properties) + CCK fields. I actually wanted to view and theme "properties" both as teaser and page view.

The problem is that hook_nodeapi works fine but hook_view does not. When I change the module of this "properties" content type in node_type table to properties, hook_view starts working but then node fields (title and Body) disappear.

Any one please suggest me.

Regards,
IftiKhan.

Comments

hook_view() only works for

hook_view() only works for the content type created by the module. It sounds like you want hook_nodeapi() and the the case where $op equals 'view'.

Thanks for the reply. Yeah, I

Thanks for the reply.

Yeah, I am currently using hook_nodeapi with $op='view', but I actually want to modify the node before rendering. I will try it out with $a3/$a4 variables to differentiate between teaser and page view.

Thanks again, that clicks the idea.

nobody click here