phpcmsv9_首页调用标签_最新文章调用_首页栏目列表调用
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
phpcmsv9_首页调用标签_最新文章调用_首页栏目列表调用
phpcmsv9同时调用多个栏目最新文章标签,其中有_时间标签_栏目标题_文章标题
{pc:get sql="Select `n`.`inputtime`,`n`.`url`,`n`.`title`,`c`.`catname`,`c`.`url` as `c_url` FROM `v9_news` as `n` left join `v9_category` as `c` on `n`.`catid` = `c`.`catid`
where `c`.`catid` in (6,7,8,9,10) order by `n`.`id` desc" num="10" cache="3600" page="" dbsource="" return="data"}
{loop $data $key $val}
target="_blank">{$val[title]}
{/loop}
{/pc}
phpcmsv9首页头条
{pc:content action="position" posid="2" order="listorder DESC" num="1"}
{loop $data $r}
{/loop}
{/pc}
phpcmsv9调用4个栏目
{pc:content action="position" posid="2" order="listorder DESC" num="4"}
{loop $data $r}
{str_cut($r[title],36,'')}
{if $n==1}{/if}{str_cut($r[description],112)}
{/loop}
{/pc}
phpcmsv9调用某栏目最新文章
{pc:content action="lists" catid="6" order="id DESC" num="10"cache="3600"}
{loop $data $r}
{/loop}
{/pc}
phpcmsv9调用图文
图片新闻
{pc:content action="position" posid="12" thumb="1" order="listorder DESC" num="10"}
{loop $data $r}
{/loop}
{/pc}
phpcmsv9外部数据源调用
{pc:get sql="Select * FROM pre_forum_thread" cache="3600" dbsource="discuz" return="data" num="10"}
phpcmsv9指定变量循环增长(幻灯片调用)
{pc:content action="position" posid="1" order="listorder DESC" thumb="1" num="5"}
{/pc}
{pc:content action="lists" catid="66" order="listorder DESC" thumb="1" num="5" }
{php $num = 0}
{loop $data $r}
linkarr[{$num}] = "{$r[url]}";
picarr[{$num}] = "{$r[thumb]}";
textarr[{$num}] = "{str_cut($r[title],36,'')}";
{php $num++}
{/loop}