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

scottrigby’s picture

I 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

mitchell’s picture

Status: Active » Postponed (maintainer needs more info)

The '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.

mitchell’s picture

Status: Postponed (maintainer needs more info) » Fixed

Event: User is going to view a page.
Condition: Path has alias

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.