• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Route Prefix

Jeremy P

Well-known member
#3
With an addon..? Use a route prefix with a callback..? If what you're doing can be accomplished using the built in pages system or something I'd go that route instead.

Screen Shot 2014-04-27 at 2.03.44 PM.png
 

LordsKing

Active member
#6
See library/XenForo/Route/Prefix/ for how XenForo uses them internally.. should help you figure out the PHP involved.
I saw that :
PHP:
<?php

class XenForo_Route_Prefix_Account implements XenForo_Route_Interface
{
    /**
    * Match a specific route for an already matched prefix.
    *
    * @see XenForo_Route_Interface::match()
    */
    public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
    {
        return $router->getRouteMatch('XenForo_ControllerPublic_Account', $routePath, 'account');
    }
}