schema.org - SiteNavigationElement not working -
i tried simple example, sitenavigationelement not working when test using google structured testing tool.
<div itemscope itemtype="http://schema.org/webpageelement"> <link itemprop="additionaltype" href="http://schema.org/itemlist" /> <meta itemprop="name" content="navigation_menu" /> <ul> <li itemprop="additionaltype" itemscope itemtype="http://www.schema.org/sitenavigationelement"> <span itemprop="itemlistelement"> <a href="http://www.example.com/link_1" itemprop="url"> <span itemprop="name">link 1</span> </a> </span> </li> <li itemprop="additionaltype" itemscope itemtype="http://www.schema.org/sitenavigationelement"> <span itemprop="itemlistelement"> <a href="http://www.example.com/link_2" itemprop="url"> <span itemprop="name">link 2</span> </a> </span> </li> </ul> </div>
the additionaltype property should not used create item (which doing itemscope+itemtype). job provide uri of additional types, uri value here.
it seems want mark each link in navigation. not possible sitenavigationelement (it can used mark whole navigation, it’s typically useless).
it possible itemlist, , provide sitenavigationelement additionaltype (but wouldn’t expect consumer make use of this):
<div itemscope itemtype="http://schema.org/itemlist"> <link itemprop="additionaltype" href="http://schema.org/sitenavigationelement" /> <ul> <li itemprop="itemlistelement" itemscope itemtype="http://schema.org/webpage"> <a href="/link-1" itemprop="url"><span itemprop="name">link 1</span></a> </li> <li itemprop="itemlistelement" itemscope itemtype="http://schema.org/webpage"> <a href="/link-2" itemprop="url"><span itemprop="name">link 2</span></a> </li> </ul> </div>
Comments
Post a Comment