get('name'); $variables['site_slogan'] = $config->get('slogan'); $variables['base_path'] = base_path(); $variables['scrolltotop_on'] = 1; } /** * Add current page to breadcrumb. */ function vre2024_preprocess_breadcrumb(&$variables) { $request = \Drupal::request(); $route_match = \Drupal::routeMatch(); $page_title = \Drupal::service('title_resolver')->getTitle($request, $route_match->getRouteObject()); if (!empty($page_title)) { $variables['breadcrumb'][] = [ 'text' => $page_title, ]; // Add cache context based on url. $variables['#cache']['contexts'][] = 'url'; } $variables['breadcrumb_icon_style'] = '/'; } /** * Html preprocess for the theme. */ function vre2024_preprocess_html(&$variables) { $variables['is_front'] = \Drupal::service('path.matcher')->isFrontPage(); }