Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
node data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2008 at 01:50 UTC
Updated:
4 Dec 2009 at 18:58 UTC
<span class="field-content"><p>...
cannot reside an inline element.
View W3C data here: W3C validator
Comments
Comment #1
merlinofchaos commentedThis isn't fixable. If you're putting in block level fields and you care about w3c validation, you'll have to override the theme and change it on an individual basis.I can't wrap it in a div because it might NOT be a block element, and I can't wrap it in a span because it might be a block element and I have to wrap it in something to get a class.
So it can only be fixed via theming.
Comment #2
Setzler commentedCouldn't you wrap everything in a DIV and set the class to
display: inline/block, depending on what the user selects for that item? Block items can go in other blocks, but blocks can't go inside inline items, so why not make everything go in a block and use CSS to control the display?Comment #3
samirnassar commentedFrom a markup perspective you cannot just wrap everything in a div element since div is block level. The CSS properties, display: [block|inline]; are only that, CSS properties and only have a bearing on the display of markup.
Inserting block level elements into inline elements is invalid markup.
Comment #4
Setzler commentedFair enough. But what about an option for each text element for display type?
Comment #5
samirnassar commentedAfter re-reading the comments. Is there ever a time a view is not a block-level entity? This is to distinguish it from being a block in Drupal parlance vs. being block-level in markup parlance. Unless you you have a one-liner view is there a reason not to wrap it in a div element?
Comment #6
merlinofchaos commentedNot the view, an individual field within a view.
Comment #7
samirnassar commentedGotcha, sorry for the noise.
Comment #8
merlinofchaos commentedFix committed. This might be a little tricky.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
seanrI'm still seeing this bug in the current version for embedded video fields even though their not set to inline. Does something need to change in the emvideo module or is there still a bug in views?
Comment #11
merlinofchaos commentedThis should be up to the module to set its fields up properly.
Comment #12
seanrOK, will check there then. Thanks.
Comment #14
yonailoHi,
What about overriding the default element type not only for being displayed as inline ?
Right now you can set up if you want the element to be displayed with a SPAN, but there is no method for forcing the field to be displayed as a block.
I have experienced the same problem as #10 with a "user: picture" field, which by default displays itself as inline.
Therefore we would have to handler three cases: forcing it as inline, forcing it as block, or leaving its default behaviour.
(Maybe I am missing something because I am not a D6 guru - yet)
Comment #15
tobiberlinIsn't it possible to override the theme function? I thought these HTML things are put into a theme function which can be overriden in template.php?!
Comment #16
merlinofchaos commentedYes, all of Views output can be overridden with theming.
Comment #17
yonailoOk, thank you for your answers.... after reading #1 I see it clearly that it must be done with theme overriding.... but then I still get confused about why it is implemented the option for forcing a field as inline...because this could also have been done with theming, ¿right?