聯(lián)系官方銷售客服
1835022288
028-61286886
開發(fā)插件,插件后臺列表的loop循環(huán)中,如何在父控制器中指定數(shù)據(jù)庫某個數(shù)據(jù)表作為這個后臺列表模板的數(shù)據(jù)?
// 后臺查看列表 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}
你自己寫插件了,沒必要這句話啊
將變量傳入模板 \Phpcmf\Service::V()->assign("list", $xxxx);