Rich-snippets - 双重电影作者

时间:2013-07-24 01:33:56

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

我不明白如果有多个相同类型的项目,就像电影的作者一样。 我必须为每个作家重复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>

2 个答案:

答案 0 :(得分:2)

后者是对的。第一个片段意味着你的人有两个名字(实际上并非如此罕见)。您可以使用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>
BTW关于schema.org属性的基数有很多讨论。如果您对详细信息感兴趣,可以在跟踪器和ISSUE页面阅读相应的材料:W3C Wiki

我个人遵循Guha所说的规则:

  

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

答案 1 :(得分:0)

我认为他们都是正确的。 Imdb使用frist语法。

<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>