帝国cms【官方教程系列教程一】 首页模板制作

 

帝国cms首页模板是指网站首页的模板。(/index.html)

修改首页模板

1、登录后台,单击“模板”菜单,选择“首页模板”子菜单,进入修改首页模板界面:

2、进入修改首页模板界面:

3、首页模板支持的变量说明
[!--news.url--]:网站地址(参数设置的站点地址)[!--class.menu--]:一级栏目导航[!--pagetitle--]:网站名称
[!--pagekey--]:页面关键字[!--pagedes--]:页面描述 
支持公共模板变量支持所有模板标签支持PHP代码


首页模板制作范例
实现如下效果:


1、用Dreamweaver制作好首页界面


2. 在制作好的界面加入模板标签及变量:
页面标题变量[!--pagetitle--]:调用位置如下图①所示。
导航条变量[!--newsnav--]:调用位置如下图②所示。
万能调用标签[ecmsinfo]: 调用位置如下图③④⑤⑥所示。作用:调用栏目信息。


说明:首页模板支持所有模板标签,只是上面例子我们只使用了ecmsinfo标签。

3. 将制作好的首页模板代码拷贝到系统后台“首页模板”中:
登录系统后台,单击“模板”菜单 》公共模板-“首页模板”;
拷贝首页模板代码,单击“修改”按钮提交,首页模板制作完毕:

4、最终首页模板的预览效果

5、附上面例子模板代码:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>[!--pagetitle--]</title>

<style>
td {font-size: 10pt;line-height: 14pt;}
.line{font-size: 10pt;line-height: 14pt;}
A:link {text-decoration: none; color:#000000}
A:visited {text-decoration: none; color: #000000} 
A:active {text-decoration: underline; color: #000000 } 
A:hover {text-decoration: underline;        color: #FF0000;}
</style>
</head>

<body topmargin="0">
<table width="700" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

  <tr>
    <td height="60"> 
      <div align="center"><font size="4"><strong>帝国CMS测试站点</strong></font></div></td>

  </tr>
  <tr>
    <td height="25" bgcolor="#FFFFFF"> 
      <div align="center"><a href="/">网站首页</a> | <a href="/news/china/">国内新闻</a> 
        | <a href="/news/world/">国际新闻</a> | <a href="/news/ent/">娱乐新闻</a> | <a href="/news/sports/">体育新闻</a></div></td>

  </tr>
</table>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr> 
    <td height="25" colspan="2">当前位置:[!--newsnav--]</td>
  </tr>
  <tr> 
    <td width="50%" valign="top"> <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

        <tr> 
          <td height="23"><a href="/news/china/"><strong>国内新闻</strong></a></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF">[ecmsinfo]34,3,42,0,0,2,0[/ecmsinfo]</td>

        </tr>
      </table></td>
    <td width="50%" valign="top"> <table width="98%" border="0" align="right" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

        <tr> 
          <td height="23"><a href="/news/world/"><strong>国际新闻</strong></a></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF">[ecmsinfo]35,3,42,0,0,2,0[/ecmsinfo]</td>

        </tr>
      </table></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>

    <td valign="top">&nbsp;</td>
  </tr>
  <tr> 
    <td> </td>
    <td> </td>

  </tr>
  <tr> 
    <td valign="top"> <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

        <tr> 
          <td height="23"><a href="/news/ent/"><strong>娱乐新闻</strong></a></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF">[ecmsinfo]36,3,42,0,0,2,0[/ecmsinfo]</td>

        </tr>
      </table></td>
    <td valign="top"> <table width="98%" border="0" align="right" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

        <tr> 
          <td height="23"><a href="/news/sports/"><strong>体育新闻</strong></a></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF">[ecmsinfo]37,3,42,0,0,2,0[/ecmsinfo]</td>

        </tr>
      </table></td>
  </tr>
</table>
<br>
<table width="700" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CEEEFB">

  <tr>
    <td height="23">
<div align="center">Powered by <a href="http://www.phome.net">EmpireCMS</a> &copy; 2002-2011 Phome.net Corporation<br>

      </div></td>
  </tr>
</table>
</body>
</html>

模板制作相关教程

帝国cms【官方教程系列教程二】 封面模板制作

帝国cms【官方教程系列教程三】 列表模板制作

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值