~~~ content循环列表调用 循环外部标签共支持 content,list,search,taglist,内部标签都一样。 content 和 list 区别 list循环是可以分页的(size=10),在不分页情况下和content循环一样。 建议大家多使用content,有分页需求才使用list,否则分页会出错。 search 是用于搜索结果页。 taglist 是用于tag标签结果页。 {wangji:content type=? sid=? nosid=? num=? title=? nonum=? id=? noid=? brand=? time=? order=?where=?} [contet:?] {/wangji:content} 参数使用说明: 参数 名称 内容 说明 使用方法 必要 type= 模型 news,product…等模型 调用指定模型内容 type=news 二选一必要 sid= 分类 数字 or 数组 当前分类下的内容 sid=5 二选一必要 nosid= 分类 数字 不包含分类下的内容 nosid=5 id= 编号 数字 or 数组 只显示此ID内容 id=5 noid= 编号 数字 or 数组 不显示此ID内容 noid=5 num= 数量 数字 显示多少个内容 num=10 必要 nonum= 数量 数字 不显示前面多少个内容 nonum=3 brand= 品牌 品牌英文 仅显示某品牌内容 brand=xiaomi title= 标题 关键词 模糊搜索标题 title=产品名 order= 排序 order,istop… 见下方排序规则 order=order time= 时间范围 day,week,month 当天,当周,当月 time=month where= 自定义规则 见下方自定义where where=zprice>0 标签使用说明: 标签 说明 备注 [content:i] 计数 从1开始 [content:j] 计数 从0开始 [content:id] 编号 [content:title] 标题 [content:downurl] 下载地址 [content:link] 链接 [content:color] 标题颜色 [content:sname] 分类名称 [content:senname] 分类名称 [content:slink] 分类链接 [content:date] 日期 [content:tag] tag标签 [content:istop] 置顶 [content:isgood] 推荐 [content:ispic] 图片新闻 [content:star] 内网星级 [content:downurl] 下载地址 [content:desc] 描述 [content:pic] 索引图 [content:spic] 索引小图 [content:pics] 图片 [content:visits] 访问量 [content:tag] tag标签 [content:indexvideo] 首页视频 [content:videourl] 内页视频 [content:content] 内容 没有格式 [content:info] 内容 保留格式 [content:desc] 内容摘要 [content:target] 外链新开窗口 包含http则输出target=_blank [content:zauthor] 作者 自定义字段 [content:zsource] 来源 自定义字段 [content:z???] 自定义模型 ???是模型参数名称 自定义where | where=? | 类似于sql中的where写法 | and替换成+  or替换成竖线 | 例如where=ispic:0,转换成sql就是ispic=0,调用非图片内容 例如where=(ispic:0|istop:0),转换成sql就是 (ispic=0 or istop=0),调用非图片或者非置顶内容 例如where=zprice>0+issell:1,转换成sql就是zprice>0 and issell=1,调用正在销售中价格大于0的产品 排序规则 标签 说明 asc=asc (升序) asc=desc (降序) order=order (以后台填入的order数值排序) order=id (以内容id排序) order=visits (根据浏览量排序) order=time (根据添加时间排序) order=istop (置顶) order=isgood (推荐) order=ispic (含图片) order=issell (在售) order=isoffer (特价) order=notop (不包含置顶))V.1.3.7以后支持 order=nogood (不包含推荐))V.1.3.7以后支持 order=nopic (不包含图片)V.1.3.7以后支持 order=nosell (不包含在售)V.1.3.7以后支持 order=nooffer (不包含特价)V.1.3.7以后支持 事例: 调用新闻(任意模板页均可使用): {wangji:content type=news num=10}<a title="[content:title]" href="[content:link]"><span class="fr">{formatdate:[content:date],yy-m-d}</span>[content:title len=20]</a>{/wangji:content} 调用新闻(外链使用): {wangji:content sid=1 num=10} <a title="[content:title]" href="[content:link]" [content:target]> [content:title len=20] </a> {/wangji:content} 当[content:link]中包含"http://",[content:target]结果是target="_blank",否则为空。 例如内容中是http://baidu.com ,结果就是 新开窗口,打开百度。 调用图片内容,指定分类 {wangji:content sid=5,6,7 num=6 order=order}<li> <a href="[content:link]" title="[content:title]"><img src="[content:pic]" width=210 height=160 alt="[content:title]" title="[content:title]" /><h3>[content:title len=15] </h3> </a></li>{/wangji:content} ~~~