Fix Variants take entity label, not the variant title

Created on 9 February 2016, over 8 years ago
Updated 17 May 2023, about 1 year ago

Hello

I Know that page manger module is under active development but I have a question and hope I could found one to answer.

Why the page manager route_alter is taking the entity label and not the variant title, this cause problems with breadcrumb.

      $page_id = $entity->id();
      $first = TRUE;
      foreach ($entity->getVariants() as $variant_id => $variant) {
        // Construct and add a new route.
        $route = new Route(
          $path,
          [
            '_entity_view' => 'page_manager_page_variant',
            '_title' => $entity->label(),
            'page_manager_page_variant' => $variant_id,
            'page_manager_page' => $page_id,
            'page_manager_page_variant_weight' => $variant->getWeight(),
            // When adding multiple variants, the variant ID is added to the
            // route name. In order to convey the base route name for this set
            // of variants, add it as a parameter.
            'base_route_name' => $route_name,
          ],
          $req
πŸ› Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan m.abdulqader

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024