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


    第一种:门户首页模板(index.htm,保存于templatedefaultportal)
    1. <!--{subtemplate common/header}-->
    2. <style id="diy_style" type="text/css"></style>
    3. 这里可以随意自定义代码
    4. <!--{subtemplate common/footer}-->
    第二种:栏目模板(必须命名list_xx.htm,保存于templatedefaultportal),做好以后在栏目编辑里面选择相应模板,再就行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,保存于templatedefaultportal),做好以后在专题添加或编辑中选择相应模板,选择是否统一页头和页尾,再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]-->
  • 相关阅读:
    Unique path
    *Jump Game
    Valid Palindrome
    *Reverse Words in a String
    Min Stack
    [?]*Simplify Path
    *Valid Parentheses
    *Sqrt(x)
    String to Integer (atoi)
    Add Digits
  • 原文地址:https://www.cnblogs.com/doseoer/p/4007741.html
Copyright © 2020-2023  润新知