Roninlewis
Member
According to the documentation I have to create a file "demo_portal_view.html" in the path "src/addons/Demo/Portal/_output/templates/public/" but when I visit the portal page it produces this error: "Template public:demo_portal_view: Template public:demo_portal_view is unknown (src\XF\Template\Templater.php:583)"
src/addons/Demo/Portal/addon.json
src/addons/Demo/Portal/Pub/Controller/Portal.php
src/addons/Demo/Portal/_output/templates/public/demo_portal_view.html
Any idea why it does not work?
src/addons/Demo/Portal/addon.json
JSON:
{
"title": "Demo - Portal",
"description": "Bla bla bla...",
"version_string": "1.0.0 Alpha",
"version_id": 1000010,
"dev": "You!",
"icon": "fa-code"
}
src/addons/Demo/Portal/Pub/Controller/Portal.php
PHP:
<?php
namespace Demo\Portal\Pub\Controller;
class Portal extends \XF\Pub\Controller\AbstractController {
public function actionIndex() {
$viewParams = [];
return $this->view('Demo\Portal:View', 'demo_portal_view', $viewParams);
}
}
src/addons/Demo/Portal/_output/templates/public/demo_portal_view.html
HTML:
<xf:title>Portal</xf:title>
Any idea why it does not work?