I noticed this works great for everything...except Media Gallery. The Media Gallery module is dependent upon the field-items div, and the field-item divs to display the galleries with the right styling (anywhere from 1-10 columns wide, and also makes the Media Galleries compatible with responsive theming).

Is there a way to override Fences for specific fields to use the "normal" Drupal field output?

The field in question would be "media_gallery_media" as opposed to something like "field_gallery_media". I already tried copying the default field.tpl.php into my theme folder and renaming it according to the normal overrides: http://api.drupal.org/api/drupal/modules%21field%21theme%21field.tpl.php/7.

Any help would be appreciate as this module is awesome for cleaning up Drupal's structure....

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xen’s picture

Status: Active » Needs review
FileSize
712 bytes

Created patch that adds a "Use Drupal standard markup" option to the selector, if the global option to override standard markup globally, isn't set.

Xen’s picture

And it should be made the default (or else the default value doesn't match what the user selected).

jsacksick’s picture

Status: Needs review » Reviewed & tested by the community

It works as promised, I added the patch to Commerce Kickstart.

JohnAlbin’s picture

Title: Override Fences for specific fields to use the "normal" Drupal field output? » Add option to use the "normal" Drupal field output
Version: 7.x-1.0 » 7.x-1.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

The nice thing about the addition in patch #2 is the Fences pull-down matches the actual configuration of the field now.

But the problem with the patch is that it doesn't work if the user has used the Override the default wrapper markup with Fences’ lean markup (single div wrapper). option of the Default “div” markup for unconfigured fields setting. If that option is selected, then the Fences div version is always used because the new Fences "use core fields" select value (added in patch #1) is "" (empty) and looks the same as an unconfigured field.

We need to add an explicit configuration for Drupal's default configuration. And I've chosen "div_div_div" to match how the other Fences suggestions work. lol at how ridiculous the new option looks (and is!)

  • JohnAlbin committed 85c0b2e on 7.x-1.x authored by Xen
    Issue #1857230 by Xen, JohnAlbin: Add option to use the "normal" Drupal...
  • JohnAlbin committed f95f654 on 7.x-1.x
    Issue #1857230 by Xen, JohnAlbin: Add option to use the "normal" Drupal...

  • JohnAlbin committed 85c0b2e on 7.x-2.x authored by Xen
    Issue #1857230 by Xen, JohnAlbin: Add option to use the "normal" Drupal...
  • JohnAlbin committed f95f654 on 7.x-2.x
    Issue #1857230 by Xen, JohnAlbin: Add option to use the "normal" Drupal...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.