Hey there, I've noticed that for the microdata http://data-vocabulary.org is being used.

As stated on the data-vocabulary website:

Since June 2011, several major search engines have been collaborating on a new common data vocabulary called schema.org.

The schema.org vocabulary can be used with both Microdata or RDFa 1.1 Lite syntax, and it has types for Event, Organization, Person, Product, Review, AggregateRating, Offer and hundreds of others.

See the schema.org blog for the latest news, and schema.org and FAQ for full details.

Which means that the data-vocabulary.org schema is being deprecated. I took the liberty to patch path_breadcrumbs to use schema.org.

I also changed the structure to be OL>LI (as it's an ordered list of links) and made the seperator optional as this should be implemented in CSS rather then content as its presentational (no seperator selected is no seperator rendered instead of '»').

Lastly I added an option to add a class to the OL indicating the amount of breadcrumbs in the list (breadcrumbs-amount-i)

Comments

immoreel’s picture

immoreel’s picture

kalabro’s picture

Status: Active » Needs review
Gml’s picture

Please put the separator as a data attribute on the list-item. Then we could add the separator with css in a pseudo element. It doesn't belong in the HTML because it doesn't add semantic value.

sokru’s picture

I continued from immoreel's patch. If using "microdata", $meta was not defined and
<meta itemprop="position" content="3"> was inside link-tag, where it should be next to link.

akshaybk0488’s picture

Hi, I tried with your solution. Its giving me the breadcrumbs for each page but breadcrumb schema is getting applied only for first page. Its not applying for remaining pages. Ex. I am having three links on Home page, so schema breadcrumb is getting applied only for first link.

enrico.sato’s picture

Hi, I created a patch for v3.4. Thanks!

valery86’s picture

StatusFileSize
new10.07 KB
new10.67 KB

Hi Enrico,

Thanks a lot for the patch, it's really needed to support schema.org!

Just one question, would be possible to have all the breadcrumbs links in the same line? I just noticed that after applying the patch the each link is in a different line and I'd like to have them inline.

I attach a screenshot before & after applying the patch

Thanks in advance!

valery86’s picture

Hi,

In case someone has the same request, I just kept this line unchanged to have them inline to make it.

$elem_tag = 'span'

valery86’s picture

Hi,

Today my Google Search Console started to display 2 new Breadcrumbs errors regarding the property item was not set. Just did this small change in the code to get it working

# 'typeof' => 'WebPage',
'property' => 'item',
'typeof' => 'WebPage',

Just in case someone else want to use it...

rdellis87’s picture

I applied patch in comment #7.

The breadcrumbs in the page were close to being the same. Visually the only difference I noticed was the space between the delimiter and the next menu item was gone.

Before:
Home » Government » External Agencies » KU Visitor Center

After:
Home »Government »External Agencies »KU Visitor Center

However, the breadcrumbs in the admin menu were no longer inline, but rather on separate lines.

Before:
Home » Administration » Configuration » Regional and language » Date and time

After:
Home»
Administration»
Configuration»
Regional and language»
Date and time

ykoech’s picture

Is it possible using JSON-LD as an option besides the two? Search engines prefer it over RDFa and Microdata.

https://developers.google.com/search/docs/data-types/breadcrumb

Thank you.

shaunole’s picture

StatusFileSize
new6.82 KB
new4.88 KB

I've updated the patch from #7 to include support for custom HTML tags. The tags can now be customized in the settings form. Additionally, the delimiter can now be enabled/disabled via a checkbox in the admin in the case that a site wants to use an empty span tag for the delimiter.