private function views_CrumbsMonoPlugin_PageTitle::viewsPageTitle in Crumbs, the Breadcrumbs suite 7.2
Loads the view and determines a breadcrumb item title based on the title configured for this view. This is used if the views path does NOT end with '%'.
Return value
null|string
1 call to views_CrumbsMonoPlugin_PageTitle::viewsPageTitle()
- views_CrumbsMonoPlugin_PageTitle::findTitle in plugins/
crumbs.views.inc - Find candidates for the parent path.
File
- plugins/
crumbs.views.inc, line 147
Class
- views_CrumbsMonoPlugin_PageTitle
- Determines a breadcrumb item title based on the view title of a page view. The same plugin class is used for Views displays with or without arguments.
Code
private function viewsPageTitle() {
// Build and initialize the view.
$view = views_get_view($this->viewName);
$view
->set_display($this->displayId);
// Trigger the title calculation by calling build_title().
$view
->build_title();
$title = $view
->get_title();
if (is_string($title) && '' !== $title) {
// Use decode_entities() to undo duplicate check_plain().
// See https://drupal.org/comment/7916895#comment-7916895
return decode_entities($title);
}
return NULL;
}