I used custom breadcrumb with a drupal 5 instal and loved it! Worked great! Now I am using for a 6 install and don't quite "get it". The filter by path is gone and is replaced with the php snippet area. Cool but I can't get it to work. Pretty simple snippet but what the heck am I doing wrong?

<?php
global $node;
  if ($node->nid == 43) {
    return TRUE; 
  }
  return FALSE;
?>

Please help!

Comments

MGN’s picture

your snippet is good, though don't put in the php tags. What are you putting in for titles and paths?

Sorry, just realized you have global $node. $node is automatically passed into the scope of your snippet, so delete that line.

wildmtsky’s picture

Thanks. I tried it without the globals and it didn't work either. I don't know if I didn't notice before or if it is because switched to the 2 beta, but there is a place now for filter by path.

Does anyone know why the token [term-path] doesn't work? How do I reference the url alias for the term path?

MGN’s picture

Sorry, I am not sure what "filter by path" your talking about - unless you mean the custom breadcrumb page that lists all the breadcrumbs and lets you sort them by breadcrumb type? But this is a new feature that was just added in 6.x-2.x . You've listed the version as 6.x-1.5, yet you talk about 2 beta? Sorry, but you've lost me...

Can you explain what type of custom breadcrumb you are creating (node, views, paths, ... ), what are you putting in for titles and paths?

[term-path] isn't a valid token, but [termpath] is.

MGN’s picture

Status: Active » Fixed

Ok. I figured out what you mean by 'filter by path'. This is still an active feature request at for the D5 version #215497: Limiting breadcrumbs by path and choosing where to insert. It hasn't been implemented in D6.

I've tested your code snippet and it works for me. Given the confusion between versions and reports of features that haven't been implement, I would recommend starting with a clean installation of custom breadcrumbs.

Marking this as fixed because the questions have been answered.

Status: Fixed » Closed (fixed)

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