sulu / SuluProductBundle

Sulu product bundle
MIT License
7 stars 8 forks source link

Product shop page controller #364

Open ISC3141 opened 7 years ago

ISC3141 commented 7 years ago

| Bug? | no it is a question about configuration | New Feature? | no | Version | Product bundle: 0.17.0, Sulu: 1.4.12 | Browser Version | Chrome 57.0.2987.133

I can define a specific template for the page of a product in the "sulu.yml" file, like the following code:

sulu_product:
    template: ClientWebsiteBundle:templates:product.html.twig

But is it also possible to define a specefic controller to add some data?

Thank you in advance for your help.

turbo-ele commented 7 years ago

Hi @ISC3141 Unfortunately there's currently no functionality for that. You will need to extend the WebsiteProductController. To achieve that you'll need to override the bundle and the controller.

Another option would be to make the controller configurable in the ProductRouteDefaultsProvider, so if you'd like to contribute, that would be awesome! 👍