PhpCms模板风格:模板制作_PHPCms教程
教程Tag:暂无Tag,欢迎添加,赚取U币!
默认模板存放在 ./templates/default/phpcms/ 目录里。
header.html、index.html、footer.html 三个模板文件。这可是模板的灵魂啊!完整页面模板就是header index footer了.
打开header.html如下:
打开footer.html如下:
header.html、index.html、footer.html 三个模板文件。这可是模板的灵魂啊!完整页面模板就是header index footer了.
打开header.html如下:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
- <title>{$head[title]}</title>
- <meta content="{$head[keywords]}" name="keywords" />
- <meta content="{$head[description]}" name="description" />
- <base href="{SITE_URL}" />
- <link href="favicon.ico" rel="shortcut icon" />
- <link href="{SKIN_PATH}{$mod}.css" rel="stylesheet" type="text/css" />
- <script language="JavaScript" src="data/config.js"></script>
- <script language="JavaScript" src="images/js/jquery.min.js"></script>
- <script language="JavaScript" src="images/js/css.js"></script>
- <script language="JavaScript" src="images/js/common.js"></script>
- <script language="JavaScript" src="images/js/login.js"></script>
- <script language="JavaScript" src="images/js/validator.js"></script>
- </head>
- <body onload="menu_selected('{php echo $catid ? $catid : $mod;}')">
- <div id="top">
- {if isset($MODULE['search'])}
- {php $types = include PHPCMS_ROOT.$MODULE['search']['path'].'include/type.inc.php';}
- <div class="f_r">
- <form name="site_search" action="{$MODULE[search][url]}" target="_blank">
- <input type="hidden" name="type" value="all"/>
- <input type="text" name="q" size="20"/>
- <select>
- <option value="all">全部</option>
- {loop $types $k $name}
- <option value="{$k}">{$name}</option>
- {/loop}
- </select>
- <input type="submit" name="s" id="button" value="搜索" />
- </form>
- </div>
- {/if}
- <div class="f_l">
- <div id="div_login" style="display:block">
- <form action="{$MODULE[member][url]}login.php" method="post" name="login" onsubmit="return loginSubmit(this, {$PHPCMS[uc]});">
- 用户名:<input type="text" name="username" size="12"/>
- 密码:<input type="password" name="password" size="12"/>
- <input type="submit" name="dosubmit" value="登录" />
- <input type="button" name="register" value="注册" onclick="redirect('{$MODULE[member][url]}register.php')"/>
- <input type="hidden" name="cookietime" value="0"/>
- </form>
- </div>
- <div id="div_logined" style="display:none">
- <span id="logined_username" class="b"></span>,<a href="{$MODULE[member][url]}">会员中心</a> |
- <a href="{if $PHPCMS['uc']}{$MODULE[member][url]}logout.php{else}javascript:logout('{$MODULE[member][url]}logout.php?action=ajax');{/if}">退出登录</a>
- </div>
- </div>
- </div>
- <div id="head">
- <div id="logo">
- <a href="{SITE_URL}"><img src="images/logo.gif" alt="{$PHPCMS[sitename]}" /></a>
- <a href="{SITE_URL}rss.php" target="_blank"><img src="images/rss.jpg" alt="rss信息聚合" /></a></div>
- <div class="ad" id="topbanner"><script language="javascript" src="data/js.php?id=1"></script></div>
- </div>
- <div id="menu">
- <ul>
- <li><a href="" id="menu_phpcms"><span>首页</span></a></li>
- {tag_一级栏目}
- <li><a href="{$MODULE[special][url]}" id="menu_special"><span>专题</span></a></li>
- <li><a href="{$MODULE[ask][url]}" id="menu_ask"><span>问吧</span></a></li>
- <li><a href="{$MODULE[search][url]}" id="menu_search"><span>搜索</span></a></li>
- </ul>
- </div>
- <!--begin main-->
- <div id="main">
- <!--begin left-->
- <div id="main_l">
- <!--begin 焦点图片,新闻-->
- ******************************中间部分代码太长 此处省略处理******************************
- <!--begin 全站搜索-->
- <!--{if isset($MODULE['search'])}-->
- <script type="text/javascript">
- function set_type(type)
- {
- $('#type').val(type);
- $('#search_tag>span').removeClass('selected');
- $('#type_' type).addClass('selected');
- }
- </script>
- <form name="search" action="{$MODULE[search][url]}" target="_blank">
- <div class="search_tag_top mar_10">
- <p id="search_tag"> <span id="type_all" class="selected" onclick="set_type('all')">全部</span> {php $types = include PHPCMS_ROOT.$MODULE['search']['path'].'include/type.inc.php';}
- {loop $types $type $name} <span id="type_{$type}" onclick="set_type('{$type}')">{$name}</span> {/loop} </p>
- </div>
- <div class="cribox_bdr_1">
- <input type="hidden" name="type" value="all" id="type"/>
- <input type="text" name="q" size="50"/>
- <input type="submit" name="s" id="button" value="搜索" />
- </div>
- </form>
- <div class="cribox_btm"></div>
- <!--{/if}-->
- ******************************中间部分代码太长 此处省略处理******************************
- <!--{if isset($MODULE['link'])}-->
- <h4><a href="{$MODULE[link][url]}"><img src="images/more.gif" alt="更多" /></a>友情链接</h4>
- <div class="pic_txt_list_1"> {tag_logo链接} </div>
- <div class="pic_txt_list_1"> {tag_文字链接} </div>
- <!--{/if}-->
- </div>
- <!--end right-->
- </div>
- <!--end main-->
- <div id="foot">
- <a href="">网站首页</a>{tag_关于我们}<br />
- <strong>{$PHPCMS['copyright']}</strong><br />
- <a href="http://www.miibeian.gov.cn/" target="_blank">{$PHPCMS[icpno]}</a>
- <a href="http://www.phpcms.cn/" class="copyright" target="_blank">Powered by Phpcms 2008</a>
- </div>
- </body>
- </html>
相关PHPCms教程:
- 相关链接:
- 教程说明:
PHPCms教程-PhpCms模板风格:模板制作。