function biblio_page in Bibliography Module 7
Same name and namespace in other branches
- 7.2 includes/biblio.pages.inc \biblio_page()
1 string reference to 'biblio_page'
- biblio_menu in ./
biblio.module - Implements hook_menu().
File
- includes/
biblio.pages.inc, line 85 - Copyright (C) 2006-2011 Ron Jerome.
Code
function biblio_page() {
$nodes = $nids = $extras = $rss_info = $info = $arg_list = $render = array();
$base = variable_get('biblio_base', 'biblio');
$info['func_args'] = func_get_args();
$info['uri'] = drupal_parse_url(request_uri());
$arg_list = biblio_arg_handler($info);
$arg_list['page_limit'] = variable_get('biblio_rowsperpage', 25);
list($nids, $extras, $rss_info) = biblio_build_query($arg_list);
if ($rss_info['feed']) {
biblio_filter_feed($rss_info, $nids);
return;
}
if (variable_get('biblio_rss', 0)) {
drupal_add_html_head_link(array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => variable_get('site_name', 'Drupal') . ' RSS',
'href' => url("{$base}/rss.xml"),
));
}
drupal_set_title(t(check_plain(variable_get('biblio_base_title', 'Biblio'))));
$filter = isset($arg_list['f']) ? array(
'f' => $arg_list['f'],
) : array();
$render['biblio_page']['header'] = biblio_page_header($filter);
$render['biblio_page']['content'] = biblio_page_content($nids, $extras);
// If no content AND we have a filter give a hint on what to do...
if (isset($render['biblio_page']['content']['section_0']) && !empty($render['biblio_page']['header']['filter_status'])) {
$render['biblio_page']['content']['hint']['#markup'] = t('!modify_link or !remove_link your filters and try again.', array(
'!modify_link' => l(t('Modify'), "{$base}/filter"),
'!remove_link' => l(t('remove'), "{$base}/filter/clear"),
));
}
return $render;
}