Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Why views display empty attachment div when view is empty? Default view is not displaying anything, and attachment attached to it display this when empty
<div class="attachment attachment-before">
<div class="view view-myview view-id-myveiw view-display-id-myview_attachment"></div>
</div>
Is this normal behaviour? Because I want to override views-view.tpl.php and $attachment_before is never empty, and I need to display message when default view and his attachment view is empty.
Comments
Comment #1
briand44 CreditAttribution: briand44 commentedI am having this same issue. I wrote a preprocess function that adds a new class to the classes array when the view result is empty. Probably not a good long term solution but it works for now.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI can confirm this bug.
Comment #2.0
Anonymous (not verified) CreditAttribution: Anonymous commentedmisstype