dmnkhhn
Active member
I have asked a similar question before but I still haven't found a good solution so far.
For my add-on I am currently using 2 PublicControllers, each with a separate route.
The url structure looks like this:
myxenforo.com/bookshelf (index, with all bookshelves)
myxenforo.com/bookshelf/1 (bookshelf, id1)
myxenforo.com/bookshelf/2 (bookshelf, id1)
myxenforo.com/book (index, with all books)
myxenforo.com/book/1 (book, id1)
myxenforo.com/book/2 (book, id1)
That's totally fine (for now) but I have one big problem: There is no way to display all bookshelves by user X.
This would require an url structure like myxenforo.com/bookshelf/member/1 (or similar)
With my current setup, it asks me for an action 'Member1' when want to open a link like this.
I am implementing the XenForo_Route_Interface, this is my method:
What do I have to change to be able to use
myxenforo.com/bookshelf/member/1
or
myxenforo.com/book/member/1
?
Thanks for your help.
For my add-on I am currently using 2 PublicControllers, each with a separate route.
The url structure looks like this:
myxenforo.com/bookshelf (index, with all bookshelves)
myxenforo.com/bookshelf/1 (bookshelf, id1)
myxenforo.com/bookshelf/2 (bookshelf, id1)
myxenforo.com/book (index, with all books)
myxenforo.com/book/1 (book, id1)
myxenforo.com/book/2 (book, id1)
That's totally fine (for now) but I have one big problem: There is no way to display all bookshelves by user X.
This would require an url structure like myxenforo.com/bookshelf/member/1 (or similar)
With my current setup, it asks me for an action 'Member1' when want to open a link like this.
I am implementing the XenForo_Route_Interface, this is my method:
PHP:
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router) {
$action = $router->resolveActionWithIntegerParam($routePath, $request, 'book_id');
return $router->getRouteMatch('Doh_Books_ControllerPublic_Book', $action, 'book');
}
What do I have to change to be able to use
myxenforo.com/bookshelf/member/1
or
myxenforo.com/book/member/1
?
Thanks for your help.
