vespolina/taxonomy-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Vespolina Taxonomy bundle. Taxonomy management and more.

dev-master / 1.0.x-dev 2013-08-30 12:19 UTC

This package is auto-updated.

Last update: 2022-02-01 12:20:02 UTC


README

The VespolinaTaxonomyBundle is part of vespolina package. It provides generic classifications for entities such as product, customers and so on for the vespolina project.

Examples of classifications include hierarchical classifications, 'tag' classifications, ...

Rendering the sidebar

Step 1: Import the bundle's routing and setup a route you want the sidebar links to point to:

# app/config/routing.yml
vespolina_taxanomy:
    resource: "@VespolinaTaxonomyBundle/Resources/config/routing.xml"
    prefix:   /vespolina/taxonomy

myCategory:
    path: /category/{categoryId}/{customSlug}
    defaults: { _controller: MyBundle:Category:show }

Step 2: Render the sidebar in a template based on the above routing configuration

The routing parameter that defines the unique id of the taxonomy node is required and defaults to id. In our custom example it is categoryId. You can also pass any additional parameters that the route requires so in our example we must also pass the parameter customSlug so we do that as well below:

{% block content_sidebar %}
    {% render url('vespolina_taxonomy_list', {
        'routeName': myCategory,
        'taxonomyIdParam': categoryId,
        'customSlug': customSlugName
    }) %}
{% endblock content_sidebar %}