I have written a custom block and put it inside the panel of "Add Content" page, but it can not change the breadcrumb. Actually the code in module includes drupal_set_breadcrumb() function, which doesn't work on “Add content” pages. My code is working on the others pages!

I need your help to change only the breadcrumb of each "Add content" page without using the available modules for drupal breadcrumb. Because I have written my code and the customization level is so high which can not be obtained with those modules.

1 Answer 1


Ok, I just solved it! It's too easy! Using the below function in template.php file:

function mytheme_breadcrumb($variables) {
  $sep = ' > ';
  if (count($variables['breadcrumb']) > 0) {
    return implode($sep, $variables['breadcrumb']) . $sep;
  else {
    return t("Home");

and using the arg() values and $variables['breadcrumb'] values in above function can enable you to check every pages path. Such as adding the below piece of code the above function:

  $breadcrumb = $variables['breadcrumb'];

  foreach($breadcrumb as $key=>$value){


https://www.drupal.org/node/64067 https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_breadcrumb/7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.