简体   繁体   中英

Breadcrumbs/Views in Drupal

I am trying to make path with the breadcrumbs for Drupal Views. I don't have much experience with this, however my code is this:

function CLIENTNAME_preprocess_breadcrumb(&$variables) {
    if (!empty($variables['breadcrumb'])) {
        // Adding the title of the current page to the breadcrumb.
        $variables['breadcrumb'][] = drupal_get_title();
        }
    }

The intention of this is to ensure that all the views have the direct path from home on down.

Instead, it isn't showing the last few steps (I can explain further if need be)

Why would this be happening?

This is because there is no interaction between views and breadcrumbs. To get such an interaction, you need to use the custom module "Custom Breadcrumbs"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM