"; if ($render) { $output .= '(Click to list '.l(t('templates without preview'), 'isedoc/templates').')'; } else { $output .= '(Click to list '.l(t('templates with preview'), 'isedoc/templates/preview').')'; } $output .= "
"; $sql = "SELECT n.nid, n.title FROM {node} n INNER JOIN {node_revisions} r ON n.nid = r.nid AND n.vid = r.vid WHERE n.type = 'template' "; $sql .= " ORDER BY n.title, n.nid, n.vid "; $res = db_query($sql); if ($res === FALSE) { return FALSE; } else { $output .= ''; } return $output; } function _isedoc_display_template($tpl,$render=TRUE) { if ($node = node_load($tpl['nid'])) { $output = "
  • Template ".l($node->title, $node->path); if ($render) { $node->build_mode = NODE_BUILD_NORMAL; $node = node_build_content ($node, FALSE, FALSE); $node->body = drupal_render ($node->content); unset ($node->teaser); node_invoke_nodeapi ($node, 'alter', FALSE, FALSE); $output .= '
    '; $output .= theme ('book_node_export_html', $node, ''); $output .= '
    '; } $output .= "
  • "; } else { $output = "
  • ".$tpl['title']."
  • "; } return $output; } ?>