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.
Now that there exists the options "Add views row classes" and "Add stripping (odd/even), first/last row classes" after unchecking both in the HTML list format, the resulting markup will be:
...
<li class="">...</li>
...
The following patch will fix that at the template level.
HTH
PS: This should be extended to the rest of the templates that don't take this into account.
Comment | File | Size | Author |
---|---|---|---|
#1 | views.2206017.html-list-remove-class-attr-when-empty.1-d7.patch | 593 bytes | MyXelf |
Comments
Comment #1
MyXelf CreditAttribution: MyXelf commentedAttaching the patch...
Comment #2
computerbarry CreditAttribution: computerbarry commentedI was having the same problem. This patch has fixed everything for me, thank you!
Just wondering if this will be added to the next release?
I'm using 7.x-3.10
Thanks, Barry
Comment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commented@computerbarry, in order for the patch in #1 to views-view-list.tpl.php to be included in a full release the patch first has to be committed, but before the patch can be committed it has to be officially 'Reviewed & tested by the community' (RTBC).