Jaxel
Well-known member
As a start of trying to figure this whole XenForo thing out... I'm just trying to make a simple "Hello World!" page. It looks pretty simple, but I know I can't figure it out... I've tried to figure it out using other people's mods, but I dont know what I'm missing.
I have a mod called "EWRporta". It works fine so far, and I have succesfully created a navtab link to it using the advice given on this thread here. The link goes to /forums/portal
The next thing I did was create a "Route" prefix.
Route Prefix: EWRporta
Route Class: EWRporta_Route_Prefix_Index
I think the route prefix should be "portal", not "EWRporta". But if I change it to "portal", it will disappear from the list of route prefixes because it does not match any existing addon ids.
File: /library/EWRporta/Route/Prefix/Index.php
The next thing I did was make the public controller for index that links to a template
File: /library/EWRporta/ControllerPublic/Index.php
Template: EWRporta_Index
I thought this was all that would be required... but unfortunately I cant get it working. I instead get an error:
I have a mod called "EWRporta". It works fine so far, and I have succesfully created a navtab link to it using the advice given on this thread here. The link goes to /forums/portal
The next thing I did was create a "Route" prefix.
Route Prefix: EWRporta
Route Class: EWRporta_Route_Prefix_Index
I think the route prefix should be "portal", not "EWRporta". But if I change it to "portal", it will disappear from the list of route prefixes because it does not match any existing addon ids.
File: /library/EWRporta/Route/Prefix/Index.php
Code:
<?php
class EWRporta_Route_Prefix_Index implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
return $router->getRouteMatch('EWRporta_ControllerPublic_Index', $routePath, 'EWRporta');
}
}
The next thing I did was make the public controller for index that links to a template
File: /library/EWRporta/ControllerPublic/Index.php
Code:
<?php
class EWRporta_ControllerPublic_Index extends XenForo_ControllerPublic_Abstract
{
public function actionIndex()
{
$viewParams = array();
return $this->responseView('EWRporta_ViewPublic_Index', 'EWRporta_Index', $viewParams);
}
}
Template: EWRporta_Index
Code:
Hello World!
I thought this was all that would be required... but unfortunately I cant get it working. I instead get an error:
Code:
Error
The controller does not define an action called .