Hi,

Could we somehow allow the editor to chose what would be the header? I would like to have an option to set the first row or first column as header and have a correct output.

Example of table with first column as header

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim-diels created an issue. See original summary.

AstonVictor’s picture

FileSize
8.14 KB

Hi there.
This patch added new field formatter - Tabular View (column).
Also, see the screenshot.

AstonVictor’s picture

Lukas von Blarer’s picture

We should also support column and row headers at the same time.

lolandese’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: new_field_formatter.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

lolandese’s picture

lolandese’s picture

Seems Code Sniffer detects an unused `use` statement.

Lukas von Blarer’s picture

We should provide these options in the default field formatter as settings. What I don't understand is the current solution of having the setting of table headers in the field type instead of the formatter. Does this make sense?

lolandese’s picture

@Lukas #9:
Yes. For D7 this was actually fixed and should be done also for D8. See #2841782: Move display related settings from manage fields to manage display.

Lukas von Blarer’s picture

Lukas von Blarer’s picture

Status: Needs work » Needs review
FileSize
2.62 KB

Here we go. I Had a little fight with render arrays, but now it works.

This depends on that patch: https://www.drupal.org/project/tablefield/issues/3019613#comment-12889642

Status: Needs review » Needs work

The last submitted patch, 12: 2848794-row-headers-12.patch, failed testing. View results

Lukas von Blarer’s picture

Status: Needs work » Needs review
FileSize
2.54 KB

Status: Needs review » Needs work

The last submitted patch, 14: 2848794-row-headers-14.patch, failed testing. View results

Lukas von Blarer’s picture

Status: Needs work » Needs review
FileSize
2.54 KB

Re-rolling again.

Status: Needs review » Needs work

The last submitted patch, 16: 2848794-row-headers-16.patch, failed testing. View results

lolandese’s picture

This seems to be fixed by #3019613: Move display related settings from manage fields to manage display and add options. Please check and close as duplicate if this is the case.

lolandese’s picture