Hi,

It seems that view field "style settings" are lost when using "views displays".

Step-by-Step:

  • Enabled "Views Displays"
  • Changed the view's display mode to "Display suite fields"
  • Adjusted the layout on /admin/structure/ds/vd/manage/*.
  • Changed a field's style settings: "Customize Field Wrapper HTML" and set Element to "H2"
  • Navigate to the view's page; the field is not (!) displayed inside a H2 element

I can still override the field output with something like <h2>[title_1]</h2>, but that seems kind-of ugly.

Is this a bug, by-design, or me doing something wrong? ;-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Status: Active » Closed (works as designed)

Yeah, not all those things are supported with views fields, so more or less by design. It's kinda hard to mimic this and i've been contemplating to remove this because we haven't even used this anyway in a project so far :)

bforchhammer’s picture

Please don't remove it, I'm using it now :-)

swentel’s picture

ok :)

dalehgeist’s picture

Just chiming in here: this feature is saving my bacon right now - I would be looking at tediously overriding several views tpl.php files if not for this feature. Unfortunately I'm running into the same problem: I have to do a rewrite within Views in order to apply the per-field styles that is such a cool feature of Views 3.

If you can get around to supporting this, I'd tell all my friends. ; )

steven.wichers’s picture

Second this. We use this feature on several websites, but the lack of tweaking the individual fields really hurts. Even if the field templates functionality worked (so you had to manage classes, wrappers, etc. via DS) that would be great.

steven.wichers’s picture

The source of the problem is that template_preprocess_views_view_fields() is not being called before template_preprocess_ds_row_fields(), so the more advanced rendering of fields never happens. I do not know what needs to be done to ensure that this hook is called before the Display Suite one.

I have hacked in a manual call to this function, and tweaked the logic of the render loop to prefer the views_view_fields rendered content instead of the thrown together markup that follows.

This is tested working on the site I am working on. This patch is a workaround, and not a fix. The fix would be to make sure the template_preprocess_views_view_fields() hook is called before template_preprocess_ds_row_fields() and then use the available fields array it provides.

steven.wichers’s picture

Here's another patch that fixes and issue with the labels on some fields not showing.

kclarkson’s picture

Status: Closed (works as designed) » Needs review

Swentel,

What do you think of this patch ?

I too am in the same boat.

Another option would be for the views display fields to have the similar options for custom settings just like the normal displays.

kopeboy’s picture

Same here, style in Views does not talk to Display Suite Views.

Are we gonna see this fix included in a version update of Views module? (please! :D )

rphillipsfeynman’s picture

Issue summary: View changes

I am still having this issue with Display Suite 7.x-2.6 and Views 7.x-3.7. I am trying to wrap a field in h1 tags but it takes no effect when I try to set it in "Style settings". My view is using an Unformatted list format and Display Suite Fields.
Also, the patch from #7 didn't work for me.

steven.wichers’s picture

Category: Support request » Bug report
littlepixiez’s picture

I have the same issue, with none of my custom views markup showing when choosing Display Suite Fields. Would be fantastic if these worked together rather than having to manually add the markup.

Per’s picture

Same issue, any clue?

cassio’s picture

How do i know if I'm using display suite fields in my view? does it matter? is enabling enough?