【发布时间】:2015-04-23 07:32:32
【问题描述】:
我目前已经像这样实现了我的面包屑:
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="HOME URL" itemprop="url">
<span itemprop="title">HOME TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="1ST LEVEL URL" itemprop="url">
<span itemprop="title">1ST LEVEL TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<span itemprop="title">CURRENT TITLE</span>
</div>
如您所见,我没有为当前页面指定 url,这将是多余的。 但是当我尝试Google testing tool 时,我收到一条错误消息,指出当前页面面包屑的 url 缺失。
鉴于此,我可以想到三个选项。
我为当前页面指定一个url:
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="HOME URL" itemprop="url">
<span itemprop="title">HOME TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="1ST LEVEL URL" itemprop="url">
<span itemprop="title">1ST LEVEL TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="CURRENT LEVEL URL" itemprop="url">
<span itemprop="title">CURRENT TITLE</span>
</a>
</div>
我只显示当前页面标题,而不将其包含在结构化数据标记中:
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="HOME URL" itemprop="url">
<span itemprop="title">HOME TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="1ST LEVEL URL" itemprop="url">
<span itemprop="title">1ST LEVEL TITLE</span>
</a> >
</div>
<span>CURRENT TITLE</span>
我没有在面包屑中显示当前级别(我不想这样做,我必须说):
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="HOME URL" itemprop="url">
<span itemprop="title">HOME TITLE</span>
</a> >
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="1ST LEVEL URL" itemprop="url">
<span itemprop="title">1ST LEVEL TITLE</span>
</a>
</div>
你认为我应该怎么做最好?
【问题讨论】:
-
我不明白你想要做什么......
-
我只是想知道我应该对当前页面的面包屑做什么:带链接的结构化数据?没有链接也没有结构化数据?什么都没有?
-
我觉得没关系,面包屑的重点是让用户在进入多级分页或浏览类别时可以返回,如果需要的话就放上去,如果它不需要在那里,那就不要放它。
-
是的,我知道,但我不太喜欢谷歌告诉我,如果你明白我的意思,我的代码中有错误^^这就是为什么我想知道该怎么做那个特殊情况。
标签: html seo breadcrumbs microdata google-rich-snippets