Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

完全自定义设计模板门户首页,栏目,专题模板方法

  [复制链接]
xiangfz 发表于 2011-4-22 09:17:46 | 显示全部楼层 |阅读模式
本帖最后由 xiangfz 于 2011-4-22 09:18 编辑

首先声明下,如果您对html、CSS、PHOTOSHOP不熟悉,特别是HTML、CSS请绕道

第一种:门户首页模板(index.htm,保存于\template\default\portal)


  1. <!--{subtemplate common/header}-->
  2. <style id="diy_style" type="text/css"></style>
  3. 这里可以随意自定义代码
  4. <!--{subtemplate common/footer}-->
复制代码


第二种:栏目模板(必须命名list_xx.htm,保存于\template\default\portal),做好以后在栏目编辑里面选择相应模板,再就行DIY


  1. <!--{subtemplate common/header}-->
  2. <!--[name]栏目模板——栏目名称自定义[/name]-->
  3. <style id="diy_style" type="text/css"></style>
  4. 这里可以随意自定义代码
  5. <!--{subtemplate common/footer}-->
复制代码


第三种:专题模板(必须命名portal_topic_xx.htm,保存于\template\default\portal),做好以后在专题添加或编辑中选择相应模板,选择是否统一页头和页尾,再DIY

  1. <!--{subtemplate common/header}-->
  2. <div id="pt" class="bm cl">
  3. <!--{subtemplate common/simplesearchform}-->
  4. <div class="z">
  5.   <a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em> $topic[title]
  6. </div>
  7. </div>
  8. <link id="style_css" rel="stylesheet" type="text/css" href="{STATICURL}topic/t1/style.css?{VERHASH}">
  9. <style id="diy_style" type="text/css"></style>
  10. <div id="widgets"></div>
  11. 这里可以随意自定义代码
  12. <!--{subtemplate common/footer}-->
复制代码
其中:
  1. <div id="pt" class="bm cl">
  2. <!--{subtemplate common/simplesearchform}-->
  3. <div class="z">
  4. <a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em> $topic[title]
  5. </div>
  6. </div>
复制代码
是位置和搜索框,可以删除




其中自定义代码部分需要DIY的地方使用下面代码,注意代码中的两个diy1必须保持一致,并且同一个htm页面中不得重复出现


  1. <!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
复制代码

评分

4

查看全部评分

下砂 发表于 2011-4-22 09:18:25 | 显示全部楼层
支持 分享~!
回复

使用道具 举报

花到飞靡 发表于 2011-4-22 09:20:15 | 显示全部楼层
前排支持,感谢分享~~
回复

使用道具 举报

64243354 发表于 2011-4-22 09:20:42 | 显示全部楼层
本帖最后由 64243354 于 2011-4-22 09:20 编辑

支持來了~
回复

使用道具 举报

歪脖 发表于 2011-4-23 04:01:36 | 显示全部楼层
很不错! 感谢了  http://bbs.029.cn
回复

使用道具 举报

disker 发表于 2011-4-24 11:52:25 | 显示全部楼层
支持楼主,谢谢分享!
回复

使用道具 举报

wuxiongjie 发表于 2011-4-25 09:16:08 | 显示全部楼层
感谢一下辛勤的楼主。
回复

使用道具 举报

sorry11 发表于 2011-4-25 20:55:47 | 显示全部楼层
回复

使用道具 举报

喜悦二手车 发表于 2011-5-1 11:00:32 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

清风来了 发表于 2011-5-11 17:31:41 | 显示全部楼层
神马意思。。。diy

我新建的一个html文档,怎么从数据库里面获取数据呢???  
用什么diy??? diy 又怎么添加呢???
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-5 15:39 , Processed in 0.116936 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表