Adding a Draggableviews field to a view breaks the Token replacement on CSS classes.
I.e. Format:unformatted Settings: row class: "[field_myfield]": works (class="mycontent" in html).
Add a Draggableviews field the row class becomes: class="-field-myfield".

Comments

ygerasimov’s picture

draggableviews support two types of display: table and html linst. It has not been intended to work with unformatted.

I have tested with HTML list to add row class with token (custom-[nid]) and it worked properly.

Please advise whether it works for you properly.

zany’s picture

Using your example (HTML List, Token "custom-[nid]") does not work for me. It results in a class of "custom--nid" for every row. I'm going to try this with a new minimal environment now and follow up. Thanks.

zany’s picture

Not working.

Drupal core 7.14
Chaos tool suite (ctools) 7.x-1.0
DraggableViews 7.x-2.0
Entity API 7.x-1.0-rc3
Views 7.x-3.3

HTML Liste of Fields. Row class "content-[nid]".

ygerasimov’s picture

@zany, please make sure you have your nid field before draggableviews field. This is very important. Can you do screenshot of your view settings page?

zany’s picture

Status: Active » Closed (works as designed)

Placing the draggableviews field last did the trick. It's obvious why, now. Usually the row class replacements are independed of the field order. When draggableviews takes over the rendering it only replaces field token that are above in the order.

You should point out that the draggableviews field should always be the last (the handle is leftmost anyway).

Thanks for the support!