0
votes

Is there any way (programmatically or using existing module) to export or dump all nodes of specific content type into a single HTML file? The content types have many CCK fields and I want to export them all as HTML as that I can retain their formatting.

Thanks

2

2 Answers

1
votes

If you want go through the node theme layer you could run something (roughly) like:

$result = db_query("SELECT nid FROM {node}");
$output = array();
while($row = db_fetch_array($result)) {
$output[] = node_view(node_load($row));
}
print implode("\n", $output);

You could put that in a menu callback or dump it to screen...

See: http://api.drupal.org/api/drupal/modules--node--node.module/function/node_view/6

1
votes

Use a Drupal view to produce a table containing the CCK type and all of it's fields that you want. Then, navigate to that page and use "View Source" from your browser to grab the HTML.

There currently is no Core or 3rd party module that does exactly what you ask.