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

Anonymous’s picture

Anonymous’s picture

Attaching a patch, the last line in the patch might break #1407384: Unchecking 'Handle as item' doesn't remove itemscope

Anonymous’s picture

StatusFileSize
new6.78 KB

This patch actually makes microdata work in Views. I still need to test whether it breaks other things.

Anonymous’s picture

StatusFileSize
new13.16 KB

This patch moves a lot of work to field_attach_view and would mean less integration is needed from other modules.

Anonymous’s picture

StatusFileSize
new15.12 KB

This patch works for the core field and reference field tests. Does not work for compound fields yet.

Anonymous’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

LTech’s picture

Does 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).