我目前实现了像这样的面包屑:
<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>
Run Code Online (Sandbox Code Playgroud)
如您所见,我没有为当前页面指定一个URL,这将是多余的.但是,当我尝试使用Google测试工具时,我收到一条错误消息,指出当前页面痕迹的网址丢失了.
鉴于此,我有三个选择,我可以想到.
我为当前页面指定了一个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> …Run Code Online (Sandbox Code Playgroud)