Search code examples
drupaldrupal-7display-suite

How to include a custom code field in a view or ds view?


Recently I was playing with display suite views. It's an interesting concept because this allows have content "displays" of a specific content type without adding displays to other content types that might not make sense.

My question arises because there's no way to include my custom code field in a view, despite I already checked my field to be present in "node" & "ds views" entities.

I tried to find my custom field in these 2 locations without success:

  • admin/structure/ds/vd/manage/{theNameOfMyView}/display

my custom code field is not here

  • admin/structure/views/view/{theNameOfMyView}

my custom code field is not here

I read that custom code fields are not exposed to views. If that is so here is my second question: What is the purpose of checking "ds views" fields when adding a "code field" with Display Suite?

custom code field edit screen

Thanks a lot!


Solution

  • The 'DS views' refers to the display format of the views. So you have to use the "Display Suite" show format when you create the views.

    enter image description here

    Notice that if you want to have a field in a views you have to create it normally and not with DS. That is what the module says.