schema.org: SiteNavigationElement with multiple elements
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.
Schema SiteNavigationElement as JSON-LD Structured Data
I would think that your SiteNavigationElements should be contained in ItemLists, or just included as separate items.
For example as part of a list:
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"ItemList",
"itemListElement":[
{
"@type":"SiteNavigationElement",
"position":1,
"name": "Home",
"description": "Homes Desc.",
"url":"http://www.example.com/"
},
{
"@type":"SiteNavigationElement",
"position":2,
"name": "Tours",
"description": "Tours desc.",
"url":"http://www.example.com/tours/"
},
...etc
]
}
</script>
However, just because you can do this does not mean you should. Check out this relevant answer.
I would think that your SiteNavigationElement URLs should be for the elements themselves on the current page (as opposed to the pages they link to), which usually do not exist.
Why would SiteNavigationElement have a schema attribute of material?
A Schema.org type can always have all properties of its parent types.
Not all properties necessarily make sense for all children types.
For SiteNavigationElement
, the parent type is WebPageElement
, and its parent type is CreativeWork
, and its parent type is Thing
.
The material
property is defined for CreativeWork
(and Product
). A CreativeWork
can also be a physical work, for which it can make sense to specify the material
. If you have a digital CreativeWork
(like every SiteNavigationElement
would be), simply ignore this property.
Related Topics
How to Style the Arrow of <Details> <Summary> Elements
Add External CSS File to Blogger Template
Alternate Background Colors for List Items
When to Use <Span> Instead <P>
HTML5 Canvas - Fill Circle with Image
When Printing Tables in Google Chrome, Content Overlaps Header
Can Outlook 2010 Use a Web Font in an HTML Email
Chrome Does Not Expand Flex Parent According to Children's Content
How to Make Firefox Auto-Refresh on File Change
Font-Awesome Icons Not Rendering via the Boostrapcdn
Difference Between Onblur and Onchange Attribute in HTML
How to Remove The Previously Selected Option from a Drop-Down Menu in a Table
Bad Value X-Ua-Compatible for Attribute Http-Equiv on Element Meta