|
PhpCms模板风格:模板制作
默认模板存放在 ./templates/default/phpcms/ 目录里。
header.html、index.html、footer.html 三个模板文件。这可是模板的灵魂啊!完整页面模板就是header index footer了.
打开header.html如下:
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
"http://www.w3.org/1999/xhtml">
"Content-Type" content="text/html; charset={CHARSET}" />
{$head[title,}
"{$head[keywords,}" name="keywords" />
"{$head[description,}" name="description" />
"{SITE_URL}" />
"favicon.ico" rel="shortcut icon" />
"{SKIN_PATH}{$mod}.css" rel="stylesheet" type="text/css" />
"menu_selected('{php echo $catid ? $catid : $mod;}')">
"top">
{if isset($MODULE['search',)}
{php $types = include PHPCMS_ROOT.$MODULE['search',['path',.'include/type.inc.php';}
class="f_r">
"site_search" action="{$MODULE[search,}" target="_blank">
[i,"hidden" name="type" value="all"/>
[i,"text" name="q" size="20"/>
"all">全部
{loop $types $k $name}
"{$k}">{$name}
{/loop}
[i,"submit" name="s" id="button" value="搜索" />
{/if}
class="f_l">
"div_login" style="display:block">
"{$MODULE[member,[url]}login.php" method="post" name="login" onsubmit="return loginSubmit(this, {$PHPCMS[uc,});">
用户名:[i,"text" name="username" size="12"/>
密码:[i,"password" name="password" size="12"/>
[i,"submit" name="dosubmit" value="登录" />
[i,"button" name="register" value="注册" onclick="redirect('{$MODULE[member,[url]}register.php')"/>
[i,"hidden" name="cookietime" value="0"/>
"div_logined" style="display:none">
"logined_username" class="b">,[url=,"{$MODULE[member,[url]}">会员中心 |
[url=,"{if $PHPCMS['uc',}{$MODULE[member,}logout.php{else}javascript:logout('{$MODULE[member,[url]}logout.php?action=ajax');{/if}">退出登录
"head">
"logo">
[url=,"{SITE_URL}">
[img][/img]
"images/logo.gif" alt="{$PHPCMS[sitename,}" />[/url]
[url=,"{SITE_URL}rss.php" target="_blank">
[img][/img]
"images/rss.jpg" alt="rss信息聚合" />[/url]
class="ad" id="topbanner">
"menu">
[*,[url=,"" id="menu_phpcms">首页[/url]
{tag_一级栏目}
[*,[url=,"{$MODULE[special,}" id="menu_special">专题
[*,[url=,"{$MODULE[ask,}" id="menu_ask">问吧
[*,[url=,"{$MODULE[search,}" id="menu_search">搜索
[/ol,
打开index.html如下:
"main">
"main_l">
******************************中间部分代码太长 此处省略处理******************************
if isset($MODULE['search',)}-->
"search" action="{$MODULE[search,}" target="_blank">
class="search_tag_top mar_10">
"search_tag"> "type_all" class="selected" onclick="set_type('all')">全部 {php $types = include PHPCMS_ROOT.$MODULE['search',['path',.'include/type.inc.php';}
{loop $types $type $name} "type_{$type}" onclick="set_type('{$type}')">{$name} {/loop}
class="cribox_bdr_1">
[i,"hidden" name="type" value="all" id="type"/>
[i,"text" name="q" size="50"/>
[i,"submit" name="s" id="button" value="搜索" />
class="cribox_btm">
if}-->
******************************中间部分代码太长 此处省略处理******************************
if isset($MODULE['link',)}-->
[url=,"{$MODULE[link,[url]}">
[img][/img]
"images/more.gif" alt="更多" />友情链接
class="pic_txt_list_1"> {tag_logo链接}
class="pic_txt_list_1"> {tag_文字链接}
if}-->
end right-->
end main-->
[/ol,
打开footer.html如下:
"foot">
[url=,"">网站首页[/url]{tag_关于我们}
{$PHPCMS['copyright',}
[url=,"http://www.miibeian.gov.cn/" target="_blank">{$PHPCMS[icpno,}[/url]
[url=,"http://www.phpcms.cn/" class="copyright" target="_blank">Powered by Phpcms 2008[/url]
[/ol,
|
|