phpcms v9 模板标签说明收拾系列

WBOY
Freigeben: 2016-06-13 12:49:48
Original
777 Leute haben es durchsucht

phpcms v9 模板标签说明整理系列

{template "content","header"} 
Nach dem Login kopieren

调用根目录下phpcms\template\content\header文件

{CHARSET} 
Nach dem Login kopieren

字符集 (gbk或者utf-8)

{if isset($SEO['title']) && !empty($SEO['title'])}
{$SEO['title']}{/if}
{$SEO['site_title']}
{$SEO['keyword']}
{$SEO['description']}
Nach dem Login kopieren

标题和标题seo优化

{CSS_PATH} 
Nach dem Login kopieren

地址替换为根目录下\statics\css

{JS_PATH}
Nach dem Login kopieren

地址替换为根目录下\statics\js

{pc:content  action="position" posid="9" order="id" num="10" cache="3600"}
Nach dem Login kopieren

pc标签{pc:content 参数名="参数值"参数名="参数值"参数名="参数值"}

{loop $data $k $v}
      <span class="sh_keyword"><li><a</span> <span class="sh_type">href</span><span class="sh_symbol">=</span><span class="sh_string">"{$v[url]}"</span><span class="sh_keyword">></span>{$v[title]}<span class="sh_keyword"></a></li></span>
{/loop}
Nach dem Login kopieren

pc标签值

action="position"--------------对话框的类型=“内容推荐位列表”
posid="9"----------------------推荐位ID="9"
order="id"---------------------排序类型="id"
num="10" ----------------------数据调用数量="10"
cache="3600"-------------------缓存="3600"毫秒

{get_siteid()}
{IMG_PATH}
action="hits" 排行,热点等
action="lists" 主要用于列表等。
catid="$catid" 当前栏目ID   指定数字,即为指定的栏目
num=""  调用文章的数量
order="id DESC" 按ID降序排列
order="id ASC"  按ID升序排列
"views DESC" 
sort=""
"1" 缩略图
return=""
page="$page" 需要分页
Nach dem Login kopieren

每当列表几行的时候出现一次这个

{if $num%2==0}   {/if}
Nach dem Login kopieren

循环标签

{loop $data $r}  {/loop}
{loop $info $r}  {/loop}
Nach dem Login kopieren

日期-------------{date('Y-m-d H:i:s',$r[inputtime])}
文章链接------{$r[url]}
文章标题------{$r[title]}
标题截取------{str_cut($r[title],40,'...')}
缩略图---------loop是info的时候用 {thumb($r[thumb],110,0)} loop是data的时候用{thumb($v[thumb],90,0)}
分页标签------{$pages}

文章页标签

标题-------{$title}
内容-------{$content}
日期-------{$inputtime}
来源-------{$copyfrom}
点击数------<span class="sh_keyword"><span</span> <span class="sh_type">id</span><span class="sh_symbol">=</span><span class="sh_string">"hits"</span><span class="sh_keyword">></span></span>  
Nach dem Login kopieren
<span class="sh_keyword"><script</span> <span class="sh_type">language</span><span class="sh_symbol">=</span><span class="sh_string">"JavaScript"</span> <span class="sh_type">src</span><span class="sh_symbol">=</span><span class="sh_string">"{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"</span><span class="sh_keyword">></script></span>
Nach dem Login kopieren

网站首页----------------{siteurl($siteid)}
当前位置----------------{catpos($catid)}
栏目名称----------------{$CAT[catname]}
栏目拼音----------------{$CAT[letter]}
栏目链接----------------{$CAT[url]}
父栏目名称--------------{$CATEGORYS[$CAT[parentid]][catname]}
父栏目链接--------------{$CATEGORYS[$CAT[parentid]][url]}
上上级栏目名称--------{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][catname]}
上上级栏目链接--------{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][url]}

一级父栏目列表

{pc:content action="category" catid="0" num="34" siteid="$siteid" order="listorder ASC"}
      {loop $data $r}
            <span class="sh_keyword"><li><a</span> <span class="sh_type">href</span><span class="sh_symbol">=</span><span class="sh_string">"{$r[url]}"</span><span class="sh_keyword">></span>{$r[catname]}<span class="sh_keyword"></a></li></span>
      {/loop}
{/pc}
Nach dem Login kopieren

同级栏目列表

{pc:content action="category" catid="$parentid" num="12" siteid="$siteid" order="listorder ASC"}
      {loop $data $r}
            <span class="sh_keyword"><li><a</span> <span class="sh_type">href</span><span class="sh_symbol">=</span><span class="sh_string">"{$r[url]}"</span><span class="sh_keyword">></span>{$r[catname]}<span class="sh_keyword"></a></li></span>
       {/loop}
{/pc}
Nach dem Login kopieren

组图列表

{loop $photos $r} 
<span class="sh_keyword"><li><a</span> <span class="sh_type">href</span><span class="sh_symbol">=</span><span class="sh_string">"{$r[url]}"</span><span class="sh_keyword">><img </span alt=" phpcms v9 模板标签说明收拾系列 " > <span class="sh_type">src</span><span class="sh_symbol">=</span><span class="sh_string">"{thumb($r[url], 75, 45, 0)}"</span> <span class="sh_type">alt</span><span class="sh_symbol">=</span><span class="sh_string">"{$r[alt]}"</span> <span class="sh_keyword">/></a></li></span>
{/loop}
Nach dem Login kopieren

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

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!