Skip to content

Instantly share code, notes, and snippets.

@pjedrzejewski
Created September 25, 2011 18:39
Show Gist options
  • Save pjedrzejewski/1240948 to your computer and use it in GitHub Desktop.
Save pjedrzejewski/1240948 to your computer and use it in GitHub Desktop.
Easy categorizing with Symfony2, gist #1.
sylius_catalog:
driver: ORM
catalogs:
assortment:
mode: S # 'S' mode matches many products to one category, 'M' many products to many categories.
property: "products" # It is 'items' by default. Name of the category items property, used in mapping and templates.
classes:
model: Application\Bundle\AssortmentBundle\Entity\Category # Category entity.
templates: # Theese are optional as there are default templates.
backend:
list: ApplicationAssortmentBundle:Backend/Category:list.html.twig
show: ApplicationAssortmentBundle:Backend/Category:show.html.twig
create: ApplicationAssortmentBundle:Backend/Category:create.html.twig
update: ApplicationAssortmentBundle:Backend/Category:update.html.twig
frontend:
list: ApplicationAssortmentBundle:Frontend/Category:list.html.twig
show: ApplicationAssortmentBundle:Frontend/Category:show.html.twig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment