table variables documentation dont match actual data

Created on 27 November 2024, 24 days ago

API page: https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/t...

Enter a descriptive title (above), then describe the problem you have found:
Dumping $variables in a template_preprocess_table function I see the associative array :
header[], rows[], attributes[], caption, sticky, responsive, empty[],footer, colgroups, title_prefix, title_suffix

header[] has: arrays of [tag (eg 'th'), attributes[storage[]], content (eg 'nid')]

rows[] has: arrays of [attributes[storage[]], cells[] ]
cells[] has: arrays of [tag (eg 'td'), attributes[storage], content[] ]
content[] has: [ #markup (eg 123), #tree, #parents, #id (eg 'edit-tablelist-10-c8'), #sorted.... #wrapper_attributes[] ]

ie much more involved and different.
It feels like whole page needs rewriting and linking with a page that explains how to use these.

📌 Task
Status

Active

Version

10.5

Component

documentation

Created by

🇬🇧United Kingdom Jons

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

Comments & Activities

Production build 0.71.5 2024