Hi!,
I'm trying to set the breadcrumbs on differents views pages, following the instructions on http://drupal.org/node/215475#comment-775424,
but on debug mode the Execute custom PHP code is always evaluated as FALSE.
Event: Content is going to be viewed
Condition: Execute custom PHP code: (without php tags)
// this seems to prevent too many redirects
$match = FALSE;
// this gets the current view
global $current_view;
// this sets to TRUE if url contains 'services' (whether or not the url is capitalized) AND is the view 'taxonomy_term'
if (($current_view->name == 'my_custom_view')) {
$match = TRUE;
}
// This returns either TRUE or FALSE
return $match;
Actions: Set breadcrumb: Titles: Mytitle Path: my/path
Thank you in advance
Comments
Comment #1
scottrigbyI tried the $url part of the 5.x instructions (at the link above) and that works. The $current_view part doesn't seem to work anymore :(
maybe something has changed in views... (fago, do you know about this one?)
:) Scott
Comment #2
mitchell commentedThe 'content is going to be viewed' condition works only when viewing nodes, not loading a views page.
I'm not sure how to set a breadcrumb when a view is loaded though.
Comment #3
mitchell commentedEvent: User is going to view a page.
Condition: Path has alias