Does XF providing anything like internal redirect, where we can catch a certain action of the controller and render a different page than the requested page?
For example, the "forums/" page by default displays a list of forums, but I want to redirect it to some other internal static page created by XF? So that, in the browser it shows me "forums" but displays different output.
I have tried following in the actionIndex method of the "src/XF/Pub/Controller/Forum.php" class:
return $this->rerouteController('XF\Pub\Controller\Page', 'index', ['node_name'=>'my-custom-page']);
It works well and takes me to "pages/my-custom-page", but in browser it also changes the URL in the address bar. I don't want that.
For example, the "forums/" page by default displays a list of forums, but I want to redirect it to some other internal static page created by XF? So that, in the browser it shows me "forums" but displays different output.
I have tried following in the actionIndex method of the "src/XF/Pub/Controller/Forum.php" class:
return $this->rerouteController('XF\Pub\Controller\Page', 'index', ['node_name'=>'my-custom-page']);
It works well and takes me to "pages/my-custom-page", but in browser it also changes the URL in the address bar. I don't want that.