2017 © Pedro Peláez
 

symfony-bundle schema-breadcrumb-bundle

This bundle generates microdata for breadcrumb.

image

exs/schema-breadcrumb-bundle

This bundle generates microdata for breadcrumb.

  • Wednesday, November 8, 2017
  • by rumpranger
  • Repository
  • 6 Watchers
  • 0 Stars
  • 977 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

EXS-Schema-BreadcrumbBundle

Build Status, (*1)

What is this bundle doing ?

This bundle generates the <script> tag containing the json object required to define the BreadcrumbList object as defined by schema.org, (*2)

Source: http://schema.org/BreadcrumbList, (*3)

Installation

Add the bundle with composer :, (*4)

$ composer require exs/schema-breadcrumb-bundle

Enable the bundle in the kernel :, (*5)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new EXS\SchemaBreadcrumbBundle\EXSSchemaBreadcrumbBundle(),
        // ...
    );
}

Usage

Example :, (*6)

<!DOCTYPE html>
<html>
    <head>
        ...
        {{ getJsonBreadcrumb([
            {
                'name': 'Category One',
                'url': 'http://www.test.tld/category-one',
                'image': 'http://www.test.tld/images/category-one.png'
            },
            {
                'name': 'Subcategory Two',
                'url': 'http://www.test.tld/category-one/subcategory-two'
            },
            {
                'name': 'Element Three',
                'url': 'http://www.test.tld/category-one/subcategory-two/element-three'
            }
        ]) }}
    </head>
    <body>
        ...
    </body>
</html>

The order of the elements in the array is used to define the order of elements in the breadcrumb., (*7)

The example above will generate the ld+json tag as :, (*8)

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "http://www.test.tld/category-one",
                "name": "Category One",
                "image": "http://www.test.tld/images/category-one.png"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "http://www.test.tld/category-one/subcategory-two",
                "name": "Subcategory Two"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "http://www.test.tld/category-one/subcategory-two/element-three",
                "name": "Element Three"
            }
        }
    ]
}
</script>

And will be interpreted by search engines as a breadcrumb like :, (*9)

Category One > Subcategory Two > Element Three

The Versions

08/11 2017

dev-master

9999999-dev https://github.com/ExSituMarketing/EXS-Schema-BreadcrumbBundle

This bundle generates microdata for breadcrumb.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ex-Situ Marketing

symfony2 bundle breadcrumb microdata

08/11 2017

v0.0.3

0.0.3.0 https://github.com/ExSituMarketing/EXS-Schema-BreadcrumbBundle

This bundle generates microdata for breadcrumb.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ex-Situ Marketing

symfony2 bundle breadcrumb microdata

26/09 2017

v0.0.2

0.0.2.0 https://github.com/ExSituMarketing/EXS-Schema-BreadcrumbBundle

This bundle generates microdata for breadcrumb.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ex-Situ Marketing

symfony2 bundle breadcrumb microdata

25/09 2017

v0.0.1

0.0.1.0 https://github.com/ExSituMarketing/EXS-Schema-BreadcrumbBundle

This bundle generates microdata for breadcrumb.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ex-Situ Marketing

symfony2 bundle breadcrumb microdata