Welcome to the THELIA support and discusssion forum
#1 redirectToRoute - available only for base routes ?
I've created module and I have a problem with routing. After update record I would like to redirect to another route. I use this code:
My route definition:
<route id="admin.productComment.update" path="/admin/productComment/update">
Is this method available only for routes defined in Config/Resources/routing/admin.xml ? - so only for Thelia base routes ?.
What's working for me is this:
But the best solution is to usign the rout id not the path. Path can change later
#2 Re: redirectToRoute - available only for base routes ?
each module had his own router, if you want to use it, you have to redifine currentRouter property in your controller using setCurrentRouter() method in your constructor for example.
class ProductCommentController extends BaseAdminController
public function __controller()
After that you can use redirectToRoute method as you describe in your post.
http://doc.thelia.net/http://thelia.net/moduleshttp://raynaud.ioPGP public Key : 0xC6E546A6