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.
The views row class number is not printing.
The expected output it's suppose to be views-row-2
Until this is fix, for a workaround solution see http://drupal.stackexchange.com/questions/191512/is-it-possible-to-get-n...
Comment | File | Size | Author |
---|---|---|---|
#19 | row-class-missing-2669394-19.patch | 1.09 KB | dagmar |
#17 | row-class-missing-2669394-17.patch | 1.09 KB | dagmar |
#12 | row-class-missing-2669394-12.patch | 1.06 KB | dagmar |
#6 | core-views_row_class_number_missing-2669394-6-D8.patch | 2.14 KB | jchin1968 |
error2.jpg | 264.18 KB | No Sssweat |
Comments
Comment #2
No Sssweat CreditAttribution: No Sssweat commentedComment #3
No Sssweat CreditAttribution: No Sssweat commentedComment #4
jchin1968 CreditAttribution: jchin1968 as a volunteer and commentedI'll work on this
Comment #5
jchin1968 CreditAttribution: jchin1968 as a volunteer and commentedComment #6
jchin1968 CreditAttribution: jchin1968 as a volunteer and commentedWith nth-child() selector available in CSS3, I don't think it's necessary to include classes like views-row-1, views-row-2, views-row-even, etc. in the HTML. You can do something like the following to highlight the first row.
.views-row:nth-child(1) {
background-color: yellow;
}
Regardless, here's a patch in case there is a use for the additional classes.
Comment #7
jchin1968 CreditAttribution: jchin1968 as a volunteer and commentedComment #8
dawehner@jchin1968 This is totally right, we don't need this actually. Let's create a patch to update the string in the UI instead
Comment #10
jchin1968 CreditAttribution: jchin1968 as a volunteer and commented@dawehner OK, I'm glad the patch is not needed since I was running into problems with simpletest.
Sorry, I don't understand your comment "create a patch to update the string in the UI". What string and which UI?
Comment #11
dawehnerWell, maybe replace "like views-row-1" in the UI.
Comment #12
dagmarThe only class added when clicking 'Add views row classes' is
views-row
.Comment #13
dawehnerIf its the only one, we could drop "like" from that help text.
Comment #14
dagmarWell, we don't know if other plugin could define other default classes. I particularly prefer at is currently implemented.
Comment #15
dawehnerI see
Comment #16
alexpottHmmm whilst we are fixing this can be put views-row into a placeholdered variable. It is not translatable. It should not be part of the translatable string.
Comment #17
dagmarThanks @alexpott. Here is the new patch.
Comment #18
alexpottShould'nt that be views-row?
Comment #19
dagmarSorry. Wrong copy and paste.
Comment #20
dawehnerHa, someone here has good eyes, someone doesn't
Comment #21
alexpottCommitted d46b0af and pushed to 8.2.x. Thanks!