Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.5
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2009 at 03:45 UTC
Updated:
11 Oct 2009 at 07:20 UTC
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
Comment #1
markus_petrux commentedSee 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.