Problem/Motivation
HTML data formats usually rely on the fact that properties are nested within the HTML tags of items in order to express the relationship between an item and its properties. However, if a site uses tools like Views or Panels to move fields around independently, microdata can't depend on that nesting.
This is also an issue if themers use something like page_alter to move fields outside of their containers.
Proposed resolution
In order to support Views and Panels, we could possibly place items as meta tags at the bottom of the page and use the itemref feature of microdata to set the relationships.
Comments
Comment #1
Anonymous (not verified) commentedMarked the following as duplicates:
#1379180: Microdata doesn't work on panel nodes
#1259704: when themers show fields outside the field wrapper, microdata breaks
Comment #2
Anonymous (not verified) commentedAttaching a patch, the last line in the patch might break #1407384: Unchecking 'Handle as item' doesn't remove itemscope
Comment #3
Anonymous (not verified) commentedThis patch actually makes microdata work in Views. I still need to test whether it breaks other things.
Comment #4
Anonymous (not verified) commentedThis patch moves a lot of work to field_attach_view and would mean less integration is needed from other modules.
Comment #5
Anonymous (not verified) commentedThis patch works for the core field and reference field tests. Does not work for compound fields yet.
Comment #6
Anonymous (not verified) commentedFixed with commit http://drupalcode.org/project/microdata.git/commit/32ad6de
Comment #8
LTech commentedDoes this mean microdata should work with panels and views now? I'm using the 7.x-1.0-beta2 release and I can't get it to work.
I've filled in the content type and fields with the correct itemtype and itemprop.
(I'm sorry to reopen the issue - should I rather start a new one).