PHP Drupal面包屑覆盖

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Drupal面包屑覆盖相关的知识,希望对你有一定的参考价值。

/**
 * Make breadcrumbs include the current page as an inactive crumb
 * Also, remove the top level for image_galleries.  
 */
function phptemplate_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    $breadcrumb_new = array();
    // Create new breadcrumb array without the top level image gallery link
    foreach ($breadcrumb as $crumb) {
      if (strstr($crumb, '<a href="/image">') != TRUE) {
        $breadcrumb_new[] = $crumb;
      }
    }
    $breadcrumb_new[] = '<span class="active">'. drupal_get_title() .'</span>';
    return '<div class="breadcrumb">'. implode(' » ', $breadcrumb_new) .'</div>';
  }
}

以上是关于PHP Drupal面包屑覆盖的主要内容,如果未能解决你的问题,请参考以下文章

php 从Drupal 8节点的分类术语中加载面包屑

php 覆盖面包屑 - Yoast SEO WordPress插件

drupal中具有不同父节点的节点的菜单和面包屑

PHP 覆盖Drupal的settings.php中的系统表设置

PHP Drupal - 取消设置(不包括)所有核心样式表 - 主题变量覆盖。

Drupal-取消设置(不包括)所有核心样式表-主题变量覆盖。