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

mwnemesis created an issue.

jlj’s picture

You can install the Schema.org WebPage module and add the breadcrumb for the current web page.

mwnemesis’s picture

I 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?

jlj’s picture

I 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.

vuil’s picture

I use the following example template (twig) file: https://gist.github.com/vuchkov/2e6c7eeea28a65c7abf383a023fd4def

mykola dolynskyi’s picture

I 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?

and this seems to be a violation

A BreadcrumbList is an ItemList consisting of a chain of linked Web pages, typically described using at least their URL and their name, and typically ending with the current page.

https://schema.org/BreadcrumbList

mykola dolynskyi’s picture

I use the Breadcrumb Manager module to show the current page title at end

worked for me, thanks @jlj