Missing #route_parameters on Properties

Created on 7 October 2023, 9 months ago
Updated 16 October 2023, 8 months ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

On this page #route_parameters attribute in missing on properties list. It's important to know about this if you need to use a route name that has mandatory parameters.

This attribute is documented and used in pager preprocess function:

https://api.drupal.org/api/drupal/core!includes!theme.inc/function/templ...

๐Ÿ“Œ Task
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Documentationย  โ†’

Last updated 1 minute ago

No maintainer
Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly maurizio.ganovelli Arezzo

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

Comments & Activities

  • Issue created by @maurizio.ganovelli
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia AditiVB

    Aditi Saraf โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia AditiVB

    According to me as there is no route for pager so route_parameters is not added In pager.php

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly maurizio.ganovelli Arezzo

    Hi Aditi, thank you for replying, pager links take current route if #route_name is not specified. This is by default. If you need to specify an alternative route with parameters (in my case i have a tableselect with an ajaxified pager in a modal popup), you need to pass also #route_parameters in the render array. This already works as expected but it's not documented in Pager.php class.

  • Status changed to Active 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Moving to current development branch.

Production build 0.69.0 2024