vespolina / taxonomy-bundle
Vespolina Taxonomy bundle. Taxonomy management and more.
Installs: 355
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 4
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/symfony: >=2.1,<2.3-dev
- vespolina/taxonomy: dev-master
Suggests
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 %}