关于使用<meta />标签隐藏定期itemtype =“http://schema.org/Event”的个别实例的当前意见是什么

时间:2015-01-25 18:14:53

标签: schema.org microdata

此活动是一个当地的农场市场,客户每周都会在一个每两年轮换一次的场地露面。由于事件的再次发生是不规则的(几周开始时间可能不同,事件之间的天数在7到5之间变化),因此有足够的理由单独列出它们。然而,人类读者不会喜欢20多个列表的美学都具有相同的描述。

1 个答案:

答案 0 :(得分:0)

您不必复制说明,可以使用itemref attribute

<p itemprop="description" id="farm-market">…<!-- description for all events --></p>

<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
  <time itemprop="startDate">2015-01-20</time>
</div>

<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
  <time itemprop="startDate">2015-02-04</time>
</div>

如果您不想在单个事件中显示任何内容(即,甚至不是日期),那么您应该在微数据中使用meta元素:

<p itemprop="description" id="farm-market">…<!-- description for all events --></p>

<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
  <meta itemprop="startDate" content="2015-01-20">
</div>

<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
  <meta itemprop="startDate" content="2015-02-04">
</div>

使用meta没有错 它是Microdata(W3C工作组注释)规范中some examples中使用的内容,为此目的,Microdata定义它是valid to use meta elements in the body