symfony - Override homepage controller in Sylius -


i using http://docs.sylius.org/en/latest/bundles/general/overriding_controllers.html reference when trying override homepage controller.

i tried following in config.yml:

sylius_web:     driver: doctrine/orm     classes:         frontend:             homepage:                 controller: spacedice\webbundle\controller\frontend\homepagecontroller 

and doesn't seem working.

what put in config.yml specify controller homepage?

in: vendor/sylius/src/sylius/bundle/webbundle/resources/config/routing/main.yml see:

sylius_homepage:     path: /     defaults: { _controller: sylius.controller.frontend.homepage:mainaction } 

but i'm not sure how override/set sylius.controller.frontend.homepage.

thanks

i able figure out couple ways this.

first, can set parameter in config.yml:

parameters:      sylius.controller.frontend.homepage.class: my\controller\here 

another option set homepage route of / in appbundle/resources/config/routing.yml

homepage:     path:     /     defaults: { _controller: appbundle:frontend\homepage:main } 

ensure routing config processed before sylius webbundle config (listed first in app/config/routing.yml) , can take there.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -