【问题标题】:Rich-snippets - Double movie authors丰富的片段 - 双电影作者
【发布时间】:2013-07-25 05:12:40
【问题描述】:

我不明白在有多个相同类型的项目的情况下如何表现,就像电影的作者一样。 我必须为每个作者重复 itemprop="author" 或者我可以将它们包含在单个 div 中?

<div itemprop="author" itemscope itemtype="http://schema.org/Person">
    <span itemprop="name"><a href="#">Cesare Frugoni</a></span>
    <span itemprop="name"><a href="#">Enrico Vanzina</a></span>
</div>

<div itemprop="author" itemscope itemtype="http://schema.org/Person">
    <span itemprop="name"><a href="#">Enrico Vanzina</a></span>
</div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
    <span itemprop="name"><a href="#">Cesare Frugoni</a></span>
</div>

【问题讨论】:

  • 你能解释一下这指的是什么吗? (谷歌搜索?如果是这样,添加google-search 标签将使更多标签关注者知道,而不仅仅是rich-snippets)。
  • 这只是语法问题。我添加了另一个标签...

标签: google-search schema.org rich-snippets


【解决方案1】:

后者是对的。第一个 sn-p 表示您的人有两个名字(这实际上并不少见)。您可以使用GoogleYandex 验证器对其进行检查。他们会给你这样的东西

person
itemType = http://schema.org/Person
name = Cesare Frugoni
name = Enrico Vanzina

而你(我相信)需要

person
itemType = http://schema.org/Person
name = Enrico Vanzina

person
itemType = http://schema.org/Person
name = Cesare Frugoni

Schema.org 在schema.org/Movie 为这种情况提供了很好的示例。

<div itemscope itemtype="http://schema.org/Movie">

<h1 itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</h1>
<span itemprop="description">Jack Sparrow and Barbossa embark on a quest to
 find the elusive fountain of youth, only to discover that Blackbeard and
 his daughter are after it too.</span>
Director:
 <div itemprop="director" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Rob Marshall</span>
</div>
Writers:
 <div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Ted Elliott</span>
</div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Terry Rossio</span>
</div>
, and 7 more credits
Stars:
 <div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Johnny Depp</span>,
 </div>
<div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Penelope Cruz</span>,
</div>
<div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Ian McShane</span>
</div>
</div>

顺便说一句,关于 schema.org 属性的基数有很多讨论。如果你对细节感兴趣,可以阅读相应的资料:ISSUE at tracker 和W3C Wiki page。

而且我个人遵循古哈所说的规则:

现在,它总是允许有多个值。

【讨论】:

    【解决方案2】:

    我认为他们都是正确的。 imdb 使用第一个语法。

    <div itemprop="creator" itemscope itemtype="http://schema.org/Person"> 
        <h4 class="inline">Writers:</h4>
        <a href="#" itemprop='url'><span class="itemprop" itemprop="name">Cesare Frugoni</span></a>
        <a href="#" itemprop='url'><span class="itemprop" itemprop="name">Steno</span></a>
    </div> 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-14
      • 2017-02-04
      • 1970-01-01
      • 1970-01-01
      • 2014-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多