Problem/Motivation
I have to implement the object BreadcrumbList in my site that have to be rendered in that way:
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "[site:url]",
"name": "[site:name]"
}
}, {
"@type": "ListItem",
"position": 2,
"item": {
"@id": "[node:category_name:url]",
"name": "[node:category_name:title]"
}
}, {
"@type": "ListItem",
"position": 3,
"item": {
"@id": "[current-page:url]",
"name": "[node:title]"
}
}]
I cannot find any documentation on how to obtain that, anyone can help me?
Steps to reproduce
Proposed resolution
I suggest to extend the documentation on how to implement that in the Module documentation
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
jlj commentedYou can install the Schema.org WebPage module and add the breadcrumb for the current web page.
Comment #3
mwnemesis commentedI did it but the result is not including the current page (in my example is missing the "position: 3" element) is there a way to include it?
Comment #4
jlj commentedI use the Breadcrumb Manager module to show the current page title at end (without link) in the breadcrumb trail and it is included in the schematic as last element.
Comment #5
vuilI use the following example template (twig) file: https://gist.github.com/vuchkov/2e6c7eeea28a65c7abf383a023fd4def
Comment #6
mykola dolynskyiand this seems to be a violation
https://schema.org/BreadcrumbList
Comment #7
mykola dolynskyiworked for me, thanks @jlj