<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
require FCPATH.'branch/fqb/D_Admin_Home.php';
class Home extends D_Admin_Home {
/**
* 構(gòu)造函數(shù)
*/
public function __construct() {
parent::__construct();
$this->content_model->where = "dianshu=10";
}
}
可以用上面的檢索功能 來(lái)檢索呀
初始數(shù)據(jù)顯示讓只滿足條件的顯示
【九天網(wǎng)絡(luò)(JiuDay)】1樓
直接模板里 去判斷下
{if $dianshu=10}
..
{/if}
用了這個(gè)但是分頁(yè)的時(shí)候數(shù)據(jù)不正常條數(shù)也不對(duì)
【九天網(wǎng)絡(luò)(JiuDay)】3樓
那你是無(wú)解了,不建議去修改核心代碼
請(qǐng)問(wèn)這個(gè)怎么更改啊 怎么才能正常顯示
【九天網(wǎng)絡(luò)(JiuDay)】5樓
不用改核心代碼,用我的方法不影響升級(jí),news模塊為例
/diy/module/news/controllers/admin/Home.php
改成:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); require FCPATH.'branch/fqb/D_Admin_Home.php'; class Home extends D_Admin_Home { /** * 構(gòu)造函數(shù) */ public function __construct() { parent::__construct(); $this->content_model->where = "dianshu=10"; } }請(qǐng)問(wèn)表單模塊怎么用構(gòu)造函數(shù)
【功能插件開(kāi)發(fā)】7樓