Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Moves RDFa property from the field (wrapper) to be available and finally added to the actual rendered referenced entity. Working on use case such as: https://www.drupal.org/node/2052355
Also handles single/multiple field items.

Without (simplified output):-

<div class="field field-name-field-entityreference-instance field-type-entityreference">
  <div class="field-items">
    <div class="field-item" property="schema:location">
      <div class="entity entity-location location-location clearfix" typeof="schema:Place">

[rendered entity 0]

      </div>
    </div>
    <div class="field-item" property="schema:location">
      <div class="entity entity-location" typeof="schema:Place">

[rendered entity 1]

      </div>
    </div>
  </div>
</div>

With:-

<div class="field field-name-field-entityreference-instance field-type-entityreference">
  <div class="field-items">
    <div class="field-item">
      <div class="entity entity-location" typeof="schema:Place" property="schema:location" inlist="">

[rendered entity 0]

      </div>
    </div>
    <div class="field-item">
      <div class="entity entity-location" typeof="schema:Place" property="schema:location" inlist="">

[rendered entity 2]

      </div>
    </div>
  </div>
</div>

Project information