[TOC]
关联表的用法
~~~
{clt:list_join db='download' dbfield='catid' id='vo' joindb='category' joinfield='id' where='catid in(".$arrchildid.") ' order="listorder asc,createtime desc" limit='10'}
~~~
### 子菜单的方法
~~~
where ('catid','in',[1,5,8])
~~~
### 文章的上一篇下一篇
![](https://box.kancloud.cn/5c294734e447c4312cb8968141efd361_929x305.png)
![](https://box.kancloud.cn/05e433a6b6ccae01195d332d31c7912b_1139x345.png)
### 后台栏目超过32,不能显示的问题
\app\admin\view\category\index.html
搜索 var table = layui.table,$= layui.jquery;
将`table.init('list', {limit:3000});`
或者分页`table.init('list', {page: true});`
<table lay-filter="list"> 改成 <table class="layui-table">
### LIST 冲突
![](https://box.kancloud.cn/3e6d380be44fd8d6963b8eb7a4d389c8_1094x643.png)
#### 调用
![](https://box.kancloud.cn/8c8aa68b7c75b4b289fddc637fb8fd07_880x139.png)
![](https://box.kancloud.cn/aac27af2f7c2898bc90bc7209cbd4fb6_562x318.png)
### 显示多个栏目
![](https://box.kancloud.cn/d59179eeb413805b93fd2285765ec931_335x327.png)
![](https://box.kancloud.cn/27e7ca4f4080bac7cc47e61fc653cf26_677x574.png)
### 分页
#### 一种方式
![](https://box.kancloud.cn/48a6ee7bce5034601f347cbf1ca65348_527x219.png)
![](https://box.kancloud.cn/d6e6aee4998e22f3c2291c1c5b861177_700x127.png)
#### 另外一种
后台列表设置下多少分页
![](https://box.kancloud.cn/32e7b490df5c8206b05ae2bf2888b739_192x257.png)
### 上传视频
![](https://box.kancloud.cn/7d299deb28b2981c70f82c89c76c157d_1342x920.png)
### 路由设置
![](https://box.kancloud.cn/eb469731c679bb95546c455639af865b_711x615.png)
### 搜索
~~~
public function search(){
$gettime=$_POST['gettime'];
$getid=$_POST['getcatid'];
if($gettime == 2017){
$gettimebegin=strtotime("2017-01-01 00:00:00");
$gettimeend=strtotime(date("Y-m-d H:i:s"));
}elseif ($gettime==2016) {
$gettimebegin=strtotime("2016-01-01 00:00:00");
$gettimeend=strtotime("2017-01-01 00:00:00");
}elseif ($gettime==2015) {
$gettimebegin=strtotime("2015-01-01 00:00:00");
$gettimeend=strtotime("2016-01-01 00:00:00");
}
$info =db('category')->where('id',$getid)->find();
$this->assign('info',$info);
//dump($gettimeend);
$search_list=db('article')
->where('catid',$getid)
->where('createtime','>',$gettimebegin)
->where('createtime','<',$gettimeend)
->order('createtime','desc')
->select();
$this->assign('getdata',$data);
$this->assign('list',$search_list);
return $this->fetch($template);
}
~~~
### 改一下控制器,两套模板,PC和手机分开的方法
![](https://box.kancloud.cn/48a6286e6619d2e351b135b962ff64fe_951x266.png)
### 调用栏目信息
![](https://box.kancloud.cn/666b6a9feedc14f5ec3776730d84f8c4_648x400.png)
![](https://box.kancloud.cn/a3e1cfaee229803e091d38ffecb5f955_1210x397.png)用in调用