function nodehierarchy_views_prepare_node in Node Hierarchy 6.2
Same name and namespace in other branches
- 6.3 nodehierarchy_views/nodehierarchy_views.module \nodehierarchy_views_prepare_node()
- 7.4 nodehierarchy_views/nodehierarchy_views.module \nodehierarchy_views_prepare_node()
- 7.2 nodehierarchy_views/nodehierarchy_views.module \nodehierarchy_views_prepare_node()
Set a default embedded view.
1 call to nodehierarchy_views_prepare_node()
- nodehierarchy_views_nodeapi in nodehierarchy_views/
nodehierarchy_views.module - Implementation of hook_nodeapi().
File
- nodehierarchy_views/
nodehierarchy_views.module, line 128 - Embed a view of children onto a node.
Code
function nodehierarchy_views_prepare_node(&$node) {
// Set the default children view if there is one for this type and if the node has not been saved yet.
if (empty($node->nid) && !$node->nh_children_view && ($children_view = variable_get('nh_default_children_view_' . $node->type, NULL))) {
list($node->nh_children_view, $node->nh_children_display) = explode(':', $children_view);
}
}