Download the PHP package xepozz/breadcrumbs-bundle without Composer

On this page you can find all versions of the php package xepozz/breadcrumbs-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package breadcrumbs-bundle

Installation

That's it for basic configuration. For more options check the Configuration section.

Usage

In your application controller methods:

Then, in your template:

to render html view of breadcrumbs.

The last item in the breadcrumbs collection will automatically be rendered as plain text rather than a <a>...</a> tag.

The addItem() method adds an item to the end of the breadcrumbs collection. You can use the prependItem() method to add an item to the beginning of the breadcrumbs collection. This is handy when used in conjunction with hierarchical data (e.g. Doctrine Nested-Set). This example uses categories in a product catalog:

If you do not want to generate a URL manually, you can easily add breadcrumb items passing only the route name with any required parameters, using the addRouteItem() and prependRouteItem() methods:

Schema.org/BreadcrumbList

If you need to render breadcrumbs for Schema.org/BreadcrumbList:

Configuration

The following default parameters can be overriden in your config.yml or similar:

These can also be passed as parameters in the view when rendering the breadcrumbs - for example:

NOTE: If you need more than one set of breadcrumbs on the same page you can use namespaces. By default, breadcrumbs use the default namespace, but you can add more. To add breadcrumbs to your custom namespace use addNamespaceItem / prependNamespaceItem or addNamespaceRouteItem / prependNamespaceRouteItem methods respectively, for example:

Then to render the subsection breadcrumbs in your templates, specify this namespace in the options:

Advanced Usage

You can add a whole array of objects at once

Example:

You can also add a tree path

NOTE: You can use addNamespaceObjectArray and addNamespaceObjectTree respectively for work with multiple breadcrumbs on the same page.

Overriding the template

There are two methods for doing this.

  1. You can override the template used by copying the Resources/views/microdata.html.twig file out of the bundle and placing it into templates/Breadcrumbs/views, then customising as you see fit. Check the Overriding bundle templates documentation section for more information.

  2. Use the viewTemplate configuration parameter:

NOTE: If you want to use the JSON-LD format, there's already an existing template at @Breadcrumbs/json-ld.html.twig. Just set this template as the value for viewTemplate either in your Twig function call (see Step 2 above) or in your bundle configuration.


All versions of breadcrumbs-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
symfony/framework-bundle Version ^5.0
symfony/templating Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xepozz/breadcrumbs-bundle contains the following files

Loading the files please wait ....