聯(lián)系官方銷(xiāo)售客服
1835022288
028-61286886
開(kāi)發(fā)插件,插件后臺(tái)列表的loop循環(huán)中,如何在父控制器中指定數(shù)據(jù)庫(kù)某個(gè)數(shù)據(jù)表作為這個(gè)后臺(tái)列表模板的數(shù)據(jù)?
// 后臺(tái)查看列表 ok protected function _Xxxx_List() { $xxxx = \Phpcmf\Service::M()->db->table(SITE_ID.'_xxx_'.$xxxx)->where('tid', $tid)->orderBy('id desc')->get()->getResultArray(); list($tpl,$xxxx) = $this->_List(); \Phpcmf\Service::V()->display($tpl); }
{loop $list $t} {/loop}
你自己寫(xiě)插件了,沒(méi)必要這句話(huà)啊
將變量傳入模板 \Phpcmf\Service::V()->assign("list", $xxxx);