Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alumei created an issue. See original summary.

Alumei’s picture

Update summary with references to same problem in panels & page manager.

Alumei’s picture

Created patch with test only as well as one with the test included.

Alumei’s picture

Status: Active » Needs review

Trigger tests.

Alumei’s picture

Status: Needs review » Needs work

The last submitted patch, 5: panels_everywhere--fix-title-block--2933423-2.testOnly.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

DamienMcKenna’s picture

Status: Needs work » Needs review
DamienMcKenna’s picture

DamienMcKenna’s picture

Alumei’s picture

While working on #2869412: Page title does not display I realized that panels allows the title to be set statically inside the panel. It also allows for token replacement.
Now if I understand #2858004: Use PE display variant on any path without route overrides correctly that should allow token replacement to work as that replacement seems to rely on contextual information.
Such token replacement should normally have access to the page title see #2714257: [current-page:title] not working properly on pages with a render array as title.

As the current behavior does not take into consideration the configured panels page title but actually overrides it in PanelsEverywhereDisplayVariant:build(), ensuring that [current-page:title] in the panels title input contains the correct value seems to be the most reasonable.

I also had another idea, which was about providing a special placeholder like '<original>' which could be put into the panels title field.During rendering we could check the configured panels title and use the current behavior in case '<original>' was present and use the rendered configured title otherwise. In contrast that does seem as nice as the simple power of token replacement.

DamienMcKenna’s picture

Status: Needs review » Needs work

At the very least this needs to be rerolled.