function opigno_breadcrumbs_get_group_title in Opigno 7
Helper function to get the group title.
We use this instead of loading the entire node object from the DB.
Parameters
int $nid:
Return value
string
1 call to opigno_breadcrumbs_get_group_title()
- opigno_breadcrumbs in modules/
breadcrumbs/ opigno_breadcrumbs.module - Get the breadcrumb trail for the current page.
File
- modules/
breadcrumbs/ opigno_breadcrumbs.module, line 79 - Breadcrumbs module definition.
Code
function opigno_breadcrumbs_get_group_title($nid) {
$query = db_select('node', 'n');
$query
->leftJoin('node_revision', 'v', 'n.vid = v.vid');
return $query
->fields('v', array(
'title',
))
->condition('n.nid', $nid)
->execute()
->fetchField();
}