How can i load a fully-processed node so it contains 'view' element for every cck field?
I tried 'node_load' with subsequent calling of:

node_invoke_nodeapi($node, 'view');
$node = node_build_content($node);
$node = node_prepare($node);

but none works. Fields still contain just 'value' and 'safe' elements.

Comments

markus_petrux’s picture

Status: Active » Fixed

See how core does this in node_view(). Note howeever that certain things are generated through template preprocess functions implemented by core and other modules, as well as CCK itself. So some data is only available in node templates.

Aside, if you have a full $node object loaded, then you can use content_view_field(), content_format() or fieldgroup_view_group() to generate the rendered output of fields and field groups. Best information on this functions is located in code itself. See content.module and fieldgroup.module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.