分析DuxCms之AdminController
1 2 /** 3 * 后台模板显示 调用内置的模板引擎显示方法, 4 * @access protected 5 * @param string $templateFile 指定要调用的模板文件 6 * @return void 7 */ 8 protected function adminDisplay($templateFile='') { 9 //获取菜单 10 $menuList = D('Admin/Menu')->getMenu($this->loginUserInfo,$this->infoModule['cutNav']['url'],$this->infoModule['cutNav']['complete']); 11 $this->assign('menuList',$menuList); 12 //复制当前URL 13 $this->assign('self',__SELF__); 14 //嵌套模板 15 $common = $this->fetch(APP_PATH.'Admin/View/common.html'); 16 $tpl = $this->fetch($templateFile); 17 echo str_replace('<!--common-->', $tpl, $common); 18 }
实现了类似iframe的效果