Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microdata layout for Breadcrumb module #240

Closed
wants to merge 2 commits into from
Closed

Microdata layout for Breadcrumb module #240

wants to merge 2 commits into from

Conversation

Bucklash
Copy link
Contributor

Matching the preferences as described here:
https://schema.org/BreadcrumbList

The user can still add a class to the separator …

And Google and co are happy :)

Matching the preferences as described here:
https://schema.org/BreadcrumbList

The user can still add a class to the separator …

And Google and co are happy :)
@Bucklash Bucklash changed the title An alternate layout for Breadcrumb module Microdata layout for Breadcrumb module Jun 29, 2016
echo '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">';
if ( $i < $count -1 ) { // If not the last item in the breadcrumbs add the separator
if ( !empty($list[$i]->link ) ) {
echo '<a itemscope itemtype="http://schema.org/Thing"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to remove
itemscope itemtype="http://schema.org/Thing"
part from a and span elements, otherwise google does not recognize it correctly (it does not read url property)

@klas
Copy link
Collaborator

klas commented Jun 30, 2016

Thanks for your contribution, please see my inline notes for minor corrections that are needed.

Erroneous code: 
itemscope itemtype="http://schema.org/Thing"

Removed '<wbr>', however, the flow of the list items is now no guaranteed...:
With <wbr>: 
home > blog > my blog items >
blog item 1

Without <wbr>: 
home > blog > my blog items 
> blog item 1

It now looks like the arrow could be a prefix to the li item, not a suffix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants