Extend Controller on v6.0 for Custom Action #370
-
Hello I am using extend controller in latest v5 configuration with custom namespace. With this, I can create custom actions like adding a score when creating a thread and so on. However, in the v6 configuration you can't use a custom namespace. Can you add that function to v6? |
Beta Was this translation helpful? Give feedback.
Answered by
Riari
Apr 29, 2024
Replies: 1 comment 5 replies
-
I'll look into this because I can't remember why I removed the namespace from the config. As a side note, could you do those things using events instead, or do you need to take in additional input with the existing forms/routes? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've taken a closer look and remember why I removed it now. It's because I refactored the routes to use the latest style of route definition, which involves proper namespace resolution instead of the old
Class@method
string approach. Obviously this has some benefits, but makes it impossible to tell the router to look in a different namespace.I think the easiest alternative is probably just to override the specific forum routes that you want to extend the behaviour of - you can just point your route definitions to your existing controllers. Let me know if that doesn't work for some reason, but it should as long as you do the route definitions after the forum service provider!