2

I am trying to implement schema.org microdata for my menu navigation. This navigation will look similar to this:

<ul>
    <li><a href="#"><span>Name1</span></a></li>
    <li><a href="#"><span>Name2</span></a></li>
    <li><a href="#"><span>Name3</span></a></li>
</ul>

I want to make use of SiteNavigationElement, unfortunately all I could find where examples with no clear answer of how to make use of multiple elements.

Does anybody know for sure, how to use SiteNavigationElement on multiple elements?

UPDATE:

This is my original menu structure I came up with after reading all answers in the duplicate link:

<nav class="menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
    <ul class="main-menu" role="menubar">
        <li class="main-menu">Home</li>
        <li class="parent">
            <ul class="sub-menu">
                <li><a itemprop="url" role="menuitem" href="index.php"><span itemprop="name">Home</span></a></li>
                <li><a itemprop="url" role="menuitem" href="tricks.php"><span itemprop="name">Tricks</span></a></li>
                <li><a itemprop="url" role="menuitem" href="features.php"><span itemprop="name">Features</span></a></li>
            </ul>
        </li>
    </ul>
 </nav>

Now, everything has been fully indexed by google and I am able to see it in Google Webmaster Tools.

So how does Google Webmaster Tools see it?

Page URL   | Items | Items with errors | Last detected |    Name    | Errors
----------------------------------------------------------------------------
Page1.php  |   1   |          -        |     2/11/16   |  Features  |    -
Page2.php  |   1   |          -        |     2/11/16   |  Features  |    -
Page3.php  |   1   |          -        |     2/11/16   |  Features  |    -
Page4.php  |   1   |          -        |     2/11/16   |  Features  |    -
...

All my pages which have been indexed and have the menu (Page1.php - Page4.php), each only have 1 item. And the detected item is always only the last link specified in SiteNavigationElement.

So there must be an error obviously.

  • Why is google only seeing one link?
  • And why is it always the last link?
lockdoc
  • 1,539
  • 1
  • 18
  • 31
  • Possible duplicate of [What is the correct use of schema.org SiteNavigationElement?](http://stackoverflow.com/questions/12491102/what-is-the-correct-use-of-schema-org-sitenavigationelement) – unor Feb 11 '16 at 20:40

1 Answers1

3

This is my original menu structure I came up with after reading all answers in the duplicate link

Except my answer, it seems ;-) As I explained in my answer to the possibly duplicate question, the url property should not be used for each navigation link. Instead, the url property should provide a URL for the whole navigation (which, typically, doesn’t exist).

The same goes for every other SiteNavigationElement property (as of Schema.org version 2.2), like name in your example: it’s for the name of the navigation (e.g., "Navigation"), not for the names of the navigation entries.

So using the SiteNavigationElement does not seem to be very useful. The same is the case with WebPageElement and its other sub-types. They may be useful in special cases and in non-HTML contexts, but generally I wouldn’t use them for typical Web pages.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • So how would I let google know about my menu structure, so it could display a couple of menu links in the search result? – lockdoc Feb 14 '16 at 12:51
  • @lockdoc: As far as Schema.org is concerned, there is no other type for navigations. A related type is [`BreadcrumbList`](http://schema.org/BreadcrumbList), but of course only for breadcrumbs. -- If you mean [Google’s Sitelinks](http://stackoverflow.com/a/21238921/1591669): according to Google’s Structured Data documentation, these don’t count as Rich Snippet, so Schema.org is not (at least not directly) relevant for showing them. – unor Feb 14 '16 at 12:59
  • in your original answer you recommend to still use `SiteNavigationElement`, but ommit `name` and `url` property. Would you also recommend this for my case or would you rather recommend to also remove the whole `SiteNavigationElement` ? – lockdoc Feb 14 '16 at 13:09
  • @lockdoc: As I mentioned here in this answer, I would remove it from Web pages (just like any other `WebPageElement` + its sub-types), unless I know a good reason to keep it (which I don’t). – unor Feb 14 '16 at 13:24
  • OK, thanks for the answer. It is very unsatisfying for me, but this is how it is :-( – lockdoc Feb 15 '16 at 11:59