Daniel Hood
Well-known member
I have my route split into two sections with this method:
which works fine, my single route handles {addon}/{section}/{action} through a single route class and works fine as far as going through the right controller.
I'm attempting to use:
{xen:adminlink '{addon}/{section}/{action}', $data}
which I feel should produce the url: {addon}/{section}/{title}.{id}/{action} but it instead products {addon}/{title}.{id}/{section}/{action} which doesn't feed through the right controller.
My build link function for my route is this (mostly because I don't have much experience with routes and this is the thing I've got working):
Let me know if it's unclear what I'm trying to do.
PHP:
$action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
which works fine, my single route handles {addon}/{section}/{action} through a single route class and works fine as far as going through the right controller.
I'm attempting to use:
{xen:adminlink '{addon}/{section}/{action}', $data}
which I feel should produce the url: {addon}/{section}/{title}.{id}/{action} but it instead products {addon}/{title}.{id}/{section}/{action} which doesn't feed through the right controller.
My build link function for my route is this (mostly because I don't have much experience with routes and this is the thing I've got working):
PHP:
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'product_id', 'title');
}
Let me know if it's unclear what I'm trying to do.