Sylius: Help Homepage controller override

Created on 23 Sep 2016  路  9Comments  路  Source: Sylius/Sylius

Hi,

I need to override the HomepageController to create my own homepage logic. I follow the docs here http://docs.sylius.org/en/latest/bundles/general/overriding_controllers.html with both ways (resource and standard) but no success, the request always going to the HomepageController inside vendor... :/

any ideias, what im doing wrong ?

thx in advance

cv

Documentation Potential Bug

Most helpful comment

Documented in: http://docs.sylius.org/en/latest/customization/controller.html. Please reopen if you still have any trouble with this task. Thanks! :)

All 9 comments

There are 2 ways to do this and both of them have little to do with Sylius -- it's all about symfony and DIC.

The docs page you've mentioned is describing how to override controllers generated via ResourceBundle, homepage isn't a resource(it doesn't extend ResourceController), hence it requires standard service override.

@TheMadeleine maybe this worth to be mentioned in new docs, WDYT?

Hello,

I didn't to test but i will try that approach. Thank you!

CV

@okwinza, @kadinho -> http://docs.sylius.org/en/latest/customization/controller.html
It's already mentioned. You're reading the old docs, which are not yet cleaned up.

@TheMadeleine nice to see it covered :+1:
But it still suggests to override *.class parameter which is gone IIRC. ;)

Well... I'm not 100% sure but since I'm working on sylius-standard while working with the docs - it still works fine. :)

Documented in: http://docs.sylius.org/en/latest/customization/controller.html. Please reopen if you still have any trouble with this task. Thanks! :)

The documentation seems not updated and not working. I am having same problem with controller customization. Any solutions?

There is already a PR with some changes to "Customizing Controllers" chapter proposed https://github.com/Sylius/Sylius/pull/10330. Can you take a look at it and share some idea about what is not working for you? Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

igormukhingmailcom picture igormukhingmailcom  路  3Comments

mezoni picture mezoni  路  3Comments

javiereguiluz picture javiereguiluz  路  3Comments

crbelaus picture crbelaus  路  3Comments

xleliberty picture xleliberty  路  3Comments