- Issue created by @AaronBauman
- Status changed to Needs review
over 1 year ago 5:06pm 8 May 2023 - πΊπΈUnited States AaronBauman Philadelphia
Test only to demonstrate the missing CSS class on the views container
- last update
over 1 year ago 1 fail Meaning it's not on the outer container, right? I think that was the original compromise, and your test seems to show that the custom class is appearing somewhere.
If that's the case, the issue may be more that the handler-specified classes aren't where they usually are with other Views.
- πΊπΈUnited States AaronBauman Philadelphia
Yes, that's right. The outermost
#theme_wrapper
div doesn't any handler- or view-specific class. It's just a generic container.Here's a patch that uses hook_views_pre_render() to address it.
I tried the same with
\Drupal\views\Plugin\views\display\DisplayPluginBase::elementPreRender
, but seems like that gets called after the container has already been rendered, because any changes to #theme_wrapper and #attributes in that context are ignored.After working through this, imo the container div is completely unnecessary, given the extensive wrapping elements already provided by views.
- last update
over 1 year ago 4 pass