function quotes_preprocess_node in Quotes 6
Same name and namespace in other branches
- 7 quotes.module \quotes_preprocess_node()
File
- ./
quotes.module, line 738 - The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.
Code
function quotes_preprocess_node(&$variables) {
// We only do this for our content and only on the links page.
if ($variables['type'] == 'quotes') {
$node = $variables['node'];
// Are we processing the view in a block?
if (isset($node->in_block) && $node->in_block) {
unset($variables['submitted']);
// Do we want titles?
switch ($node->show_titles) {
case 0:
// No title.
unset($variables['title']);
break;
case 1:
// Link to node.
$variables['node_url'] = '/node/' . $variables['nid'];
break;
case 2:
// Plain text.
unset($variables['node_url']);
break;
}
}
}
}