phpcms V9内容页调用标签

1、页面标题:{$title}

2、发表时间:{$inputtime}

3、内容来源:{$copyfrom}

4、文章内容:{$content}

5、缩略图地址:{$thumb}

6、组图列表:

{loop $photos $r}
<li><a href="{$r[url]}"><img src="{thumb($r[url], 75, 45, 0)}" />
{/loop}
 

注释:其中$photos为自定义组图字段,{$r[url]}为图片地址,{thumb($r[url], 75, 45, 0)}为图片缩略图,{$r[alt]}为图片描述。

7.点击量

<span>点击:<span id="hits"></span>次</span>(需加载{app_path}jquery.min.js)
<script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>

8.相关文章

{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" keywords="$rs[keywords]"}
{if $data}
{loop $data $r}
<a href="{$r[url]}" target="_blank">{$r[title]}</a>{date('Y-m-d',$r[inputtime])}
{/loop}
{/if}
{/pc}{$inputtime}

9.频道排行

{pc:content  action="hits" catid="$catid" num="10" order="views DESC" cache="3600"}
{loop $data $r}
<a href="{$r[url]}" target="_blank" title="{$r[title]}">{str_cut($r[title], 28, '')}</a>
{/loop}
{/pc}

10.当前位置

<a href="{siteurl($siteid)}">首页</a><span> &gt; </span>{catpos($catid)} 正文

11.内容分页

{$pages}

12.当前栏目

<a href="{$CAT[url]}">{$CAT[catname]}</a> 

13.上一篇

上一篇:
<a href="{$previous_page[url]}">{$previous_page[title]}</a>

下一篇

下一篇:
<a href="{$next_page[url]}">{$next_page[title]}</a>

14.文章投票

{if $voteid}<script language="javascript" src="{APP_PATH}index.php?m=vote&c=index&a=show&action=js&subjectid={$voteid}&type=2"></script>{/if}
 

15.文章评论

{if $allow_comment}
<iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>
<h5>评论排行</h5>
{pc:comment action="bang" siteid="$siteid" cache="3600"}
{loop $data $r}
<a href="{$r[url]}" target="_blank">{str_cut($r[title], 40)}</a><span>({$r[total]})</span>
{/loop}
{/pc}
{/if}

 

16.加入收藏

<a href="javascript:;" onclick="add_favorite('{$title}');" class="t6">收藏</a>

17.文件/多文件下载地址  【$自定义字段名】

{loop $downfile $r}
<li>{$r}</li>
{/loop}
{loop $downfiles $r}
<li>{$r}</li>
{/loop}

18.相关热词搜索:

{loop $keywords $keyword}
<a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}" class="blue">{$keyword}</a>
{/loop}



原文地址:https://www.cnblogs.com/shenzikun1314/p/6755194.html