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

How to override XenForo/Router::resolveActionAsPageNumber

Discussion in 'XenForo Development Discussions' started by Marcus, Jul 16, 2013.

  1. Marcus

    Marcus Well-Known Member

    Do you know how I could override this function? The idea is to replace "page5" with "pagina5" in the links
    PHP:
        public function resolveActionAsPageNumber($actionZend_Controller_Request_Http $request)
        {
            if (
    preg_match('#^pagina-(\d+)$#i'$action$match))
            {
                
    $action '';
                
    $request->setParam('page'$match[1]);
            }

            return 
    $action;
        }
     
  2. xf_phantom

    xf_phantom Well-Known Member

Share This Page