public function FrxDrupalControls::drupal_node_content in Forena Reports 7.4
Same name and namespace in other branches
- 6.2 plugins/FrxDrupalControls.inc \FrxDrupalControls::drupal_node_content()
- 7.5 plugins/FrxDrupalControls.inc \FrxDrupalControls::drupal_node_content()
- 7.2 plugins/FrxDrupalControls.inc \FrxDrupalControls::drupal_node_content()
- 7.3 plugins/FrxDrupalControls.inc \FrxDrupalControls::drupal_node_content()
File
- plugins/
FrxDrupalControls.inc, line 67 - Provides data blocks for native drupal connections using the default drupal connections.
Class
- FrxDrupalControls
- @file Provides data blocks for native drupal connections using the default drupal connections.
Code
public function drupal_node_content($nid, $format) {
$nid = @(int) $nid;
$node = @node_load($nid, NULL, TRUE);
if (!$node) {
return '';
}
if (strcasecmp($format, 'teaser') === 0 || !$format) {
$format = 'teaser';
}
else {
$format = 'full';
}
//If true, render the teaser
//else render the body
$output = theme('node', node_view($node, $format));
return $output;
}