POST TIME:2020-04-08 17:44
每个分类列表页要调用不同的图片
我在arctype 表加个typepic 字段 然后分别在/dede/catalog_edit.php 第59行加上typepic='$picname',
在221行加上加上个表单
		<tr>
		<td class='bline' height="30">栏目图片:</td>
		<td class='bline'>
		<input name="picname" type="text" id="picname" style="width:300px" value="<?php echo $myrow["typepic"]?>"><input type="button" name="Submit" value="浏览..." style="width:70px" onClick="SelectImage('form1.picname','');">
		</td>
		</tr>
在dede/tempet/catalog_edit.htm 模板 加个提交表单
		<tr>
		<td class='bline' height="30">栏目图片:</td>
		<td class='bline'>
		<input name="picname" type="text" id="picname" style="width:300px" value="<?php echo $myrow["typepic"]?>"><input type="button" name="Submit" value="浏览..." style="width:70px" onClick="SelectImage('form1.picname','');">
		</td>
		</tr>
如图所示
上传图片 在列表页当中加上{dede:field.typepic/}调用 图片调出
发现次列表下的文章 也要调用此文件
在include/extend.func.php
加上
		function GetTypeImg($typeid){
		global $dsql;
		$sql = "select `typepic` from `dede_arctype` where `id`='$typeid'";
		$row = $dsql->GetOne($sql);
		return $row['typepic'];
		}
然后再文件页加上 {dede:field.typeid function="GetTypeImg(@me);"}
