Hey @jeffburnz, I have been playing around with JohnAlbin's awesome Fences module in an attempt to get more lean semantic markup. While fences lets you override default fields in the manage display section for each and every field, fences also has some global and far reaching settings in its main configuration area. These two settings are as follows (image is attached as well):
a) Default DIV Markup for unconfigured fields: Override the default wrapper markup with Fences' lean markup (single div wrapper)
b) Default Classes: Override the default classes with Fences' single field-name class
Do you know if using these two settings as defaults would in any way cause problems with adaptivetheme or some of the CSS you have written as a lot of Drupal's 'divitis' would be gone. :)
Comment | File | Size | Author |
---|---|---|---|
Fences.JPG | 38.09 KB | sylus |
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedI wouldn't think you'll run into any major problems, although AT has an override for theme_field() and two more, one for image fields and one for taxonomy term fields. Worth experimenting, I'll give it a whirl. I've used it quite a lot as well, although not with those global settings - in fact I didn't even know they existed :)
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedUsing the single class will break things in two places:
1 - if you are using the image alignment settings, they need the field-type class.
2 - the default styles for taxonomy term fields, that uses the field-type class also.
No big deals really.
Comment #3
MXTHi all,
I don't know if something has changed in last 7.x-3.1 but now I encountered the following inconsistency: the more external wrapper (that one that includes the field itself and its label) disappear at all.
Case 1-> resulting html for a field with fences module disabled:
.
Case 2-> the same field with fences module enabled and "Wrapper markup" setted as "Paragraph -
<p>
- paragraph":Notice that the wrapper
<section ...>...</section>
has disappeared and the label tag becomes a<span>
.
Case 3-> the same field with fences module enabled and "Wrapper markup" setted as "No markup - no wrapping html":
Notice that correctly no wrapper is printed around the field, but the major external wrapper
<section ...>...</section>
still is not present.For all above cases the Fences global setting "Default “div” markup for unconfigured fields" is setted to " Use the default wrapper markup from Drupal (nested divs).".
But the result is the same if this is changed to "Override the default wrapper markup with Fences’ lean markup (single div wrapper)"
<h2>
to<span>
?Thank you very much
Comment #4
MXTAll the above results are by design from Fences module.
(you can create your own field templates in "Fences" mode as described in Fences project page)
So there is no conflict with adaptivetheme
Comment #5
MXTooops, I have to reopen this because there is a issue with taxonomy fields.
Applying a fences wrapper markup on taxonomy fields does not have any effect: this is completely ignored: why?
(Fences "Default classes" global configuration is setted to "Use Drupal’s default classes (field, field-name-field-NAME, field-type-TYPE, field-label-LABELTYPE, clearfix, field-item, odd, even)."
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedRead #1, because AT blows away its changes in the theme. Themes always have last crack at theme functions and templates.
AT did this before Fences module was built, so changing this now is a bit problematic, it might change in a 7.x-4.x version of the theme, for now and especially for image fields I can't change this, it would break a lot of sites.
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedAT did this before Fences module was built, so changing this now is a bit problematic, it might change in a 7.x-4.x version of the theme, for now and especially for image fields I can't change this, it would break a lot of sites.
Tried to edit my comment above, d.o is freaking out and not saving my comment edits.
Comment #8
MXTSo what do you suggest for an momentanea workaround? I have to re-implement adaptivetheme_field__taxonomy_term_reference($vars) in my subtheme template.php ?
Comment #9
Jeff Burnz CreditAttribution: Jeff Burnz commentedYes, add the function to your template.php file and go to town.