2 issues in one here:
Firstly any field where you select any header HTML element such as h1, h2 h3 etc. for the field and label wrapper and the field will cause the field element to drop out of the field and label wrapper:
should be:
<h1 class="views-field views-field-name"><h1 class="field-content">TEXT<h1></h1>
instead you get:
<h1 class="views-field views-field-name"> </h1>
<h1 class="field-content">TEXT<h1>
This only happens if both field and label wrapper and field use a h1-h6 element
Second issue only effects user-picture field, its seems that regardless of what HTML element you select to use for the field element it will only output a div - even if you select none you will still get a div.
ADDED:
Its seems views only looks to see if the user-picture field is set to inline in the field settings and ignores all custom HTML settings in the Style settings.
this function in views_handler_field_user_picture.inc is what is causing issue:
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
if ($inline) {
return 'span';
}
return 'div';
}
if $inline is false it should really then look to what (if any) custom html has been selected
Comment | File | Size | Author |
---|---|---|---|
#4 | custom_html_for_fields_and_user_pics-1377954-4.patch | 807 bytes | MiSc |
Comments
Comment #1
lx24 CreditAttribution: lx24 commentedOk actually solved this issue myself. I dont know how to create a patch but basically all you need to do is change the function element_type(...) in views_handler_field_user_picture.inc to:
hope this helps
Comment #2
dawehnerYou should definitive learn how to create patches: http://drupal.org/node/707484 It's definitive not that difficult as you think.
Sure i see the change here, but for exercise i leave this for you :)
Comment #3
dawehnerSometimes i'm wondering whether i do something wrong. The answer seems to be quite fast so you could have seen my answer.
It is to much to ask people to write this patches? Update priority.
Add some tag to add possible contributors
Comment #4
MiSc CreditAttribution: MiSc commentedAdded patch for solution in comment 2.
Comment #5
dawehnerThanks for the patch, it totally look fine! Committed to 7.x-3.x and 6.x-3.x
Comment #6.0
(not verified) CreditAttribution: commentedAdded some additional info