>  기사  >  백엔드 개발  >  phpcms v9 템플릿 제작 튜토리얼(3)

phpcms v9 템플릿 제작 튜토리얼(3)

黄舟
黄舟원래의
2016-12-30 10:47:291294검색

오늘도 본문 이야기 계속

{template "content","header"}

루트 디렉터리에 있는 phpcms/template/content/header 파일을 호출하세요

;템플릿 댓글입니다! 코드를 작성하고 주석을 추가하는 습관을 들이는 것이 좋습니다.

이것은 div 태그입니다. div가 무엇인지 모르신다면 온라인 튜토리얼을 방문해 보세요. 이해가 안가시면 계속 읽으실 필요는 없습니다

<!--这里是pc标签{pc:content 参数名="参数值" 参数名="参数值" 参数名="参数值"}-->
{pc:content action="position" posid="2" order="listorder DESC" num="4"}
<!--显示PC标签中的数据-->
{loop $data $r}
{str_cut($r[title],36)}
{if $n==1}{/if}{str_cut($r[description],112)}
{/loop}
{/pc}
<!--结束标签-->
<!--这里还是pc标签-->
{pc:content action="position" posid="1" order="listorder DESC" thumb="1" num="5"}
{loop $data $r}
{/loop}
{/pc}
推广
{pc:block pos="index_block_1"}
{/pc}
图片新闻
{pc:content action="position" posid="12" thumb="1" order="id DESC" num="10"}
{loop $data $r}
{str_cut($r[title],20)}
{/loop}
{/pc}
{loop subcat(0,0,0,$siteid) $r}
{php $num++}
{$r[catname]}更多>>
{pc:content action="lists" catid="$r[catid]" num="1" thumb="1" order="id DESC" return="info"}
{loop $info $v}
{str_cut($v[&#39;title&#39;],28)}
{str_cut($v[&#39;description&#39;],100)}
{/loop}
{/pc}
{pc:content action="lists" catid="$r[catid]" num="5" order="id DESC" return="info"}
{loop $info $v}
·{str_cut($v[&#39;title&#39;],40)}
{/loop}
{/pc}
{if $num%2==0}
{/if}
{/loop}
公告
{pc:announce action="lists" siteid="$siteid" num="2"}
{loop $data $r}
{$r[&#39;title&#39;]}
{/loop}
{/pc}
专题更多>>
{pc:special action="lists" siteid="$siteid" elite="1" listorder="3" num="2"}
{loop $data $r}
{if $n!=1}
{/if}
{str_cut($r[title],&#39;18&#39;)}
{str_cut($r[&#39;description&#39;],50)}
{/loop}
{/pc}
热点 | 评论 | 关注排行
{pc:content action="hits" catid="35" num="10" order="views DESC"}
{loop $data $r}
{$r[title]}
{/loop}
{/pc}
{pc:comment action="bang" num="10" cache="3600"}
{loop $data $r}
{$r[title]}
{/loop}
{/pc}
{pc:content action="hits" catid="35" num="10" order="views DESC"}
{loop $data $r}
{$r[title]}
{/loop}
{/pc}
调查问卷更多>>
更多>>友情链接申请链接
{pc:link action="type_list" siteid="$siteid" linktype="1" order="listorder DESC" num="8" return="pic_link"}
{loop $pic_link $v}
{/loop}
{/pc}
{pc:link action="type_list" siteid="$siteid" order="listorder DESC" num="10" return="dat"}
{loop $dat $v}
{if $type==0}
{$v[name]} |
{else}
{/if}
{/loop}
{/pc}
$(function(){
new slide("#main-slide","cur",310,260,1);//焦点图
new SwapTab(".SwapTab","span",".tab-content","ul","fb");//排行TAB
})
{template "content","footer"}

위 내용은 phpcms v9 템플릿 만들기 튜토리얼(3) 내용입니다. PHP 중국어 홈페이지(www.php.cn)!


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.