Problem/Motivation
Drupal theme suggestions indicate that hook_off_canvas_page_wrapper() is available to affect the rendering of content using off-canvas-page-wrapper.html.twig
. However, attributes cannot be added with hook_off_canvas_page_wrapper()
without forking the system template, which seems a bit unnecessary.
The system template is missing {{ attributes }}
in the main div wrapper.
Steps to reproduce
* Create a module or theme that includes hook_off_canvas_page_wrapper()
.
* Add code in the module/theme hook to add attributes to the template.
Expected behavior:
* Attributes added will appear in the markup.
Actual behavior:
* Attributes added do not appear.
Proposed resolution
Add {{ attributes }} to the system template.
Also for consistency, add {{ attributes }}
to the stable9 template and the claro template so that module hooks adding attributes generally to the off-canvas-page-wrapper.html.twig
via a module will also effectively add those attributes to the Claro theme, and to any theme created with Drupal's starterkit theme, which pulls templates from Stable9.
Remaining tasks
Patch is attached.
Data model changes
Data model changes to the templates have been added in the affected twig template files.
Release notes snippet
* Adds {{ attributes }} to off-canvas-page-wrapper.html.twig for theming purposes.