【发布时间】:2016-11-06 13:38:49
【问题描述】:
我正在为在线系统编写管理 web ui,我设法将 url 安装到视图中,
$app->get(
"/main/index",
function () use ($app){
//no echo here
$app["view"]->render(
"main","index"
);
}
);
我的主控制器就像,
<?php
class MainController extends ControllerBase
{
public function initialize()
{
$this->tag->setTitle('Home Page');
$this->view->setTemplateAfter('nav');
}
public function indexAction()
{
}
}
我的视图结构是这样的,
views
--layouts
----index.volt
----nav.volt
--main
----index.volt
--index.volt
我的问题是无论我如何更改 MainController 代码,它都不会影响渲染视图 main,index 上的任何内容。所以我想知道这里出了什么问题?
【问题讨论】: