使用者工具

網站工具


wiki:sidebar

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版前次修改
下次修改
前次修改
wiki:sidebar [2006/11/05 12:25] – wenpeiwiki:sidebar [2008/08/28 01:33] (目前版本) – wenpei
行 1: 行 1:
 +====== 原始網址 ======
 [[http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/addsidebar]] [[http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/addsidebar]]
  
-====== How To: Add a Sidebar to an existing Template ======+http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/sidebar 
 + 
 +===== How To: Add a Sidebar to an existing Template =====
  
 //These instructions assume you have a basic understanding of php, html & css and understand how to successfully create your own Dokuwiki template.// //These instructions assume you have a basic understanding of php, html & css and understand how to successfully create your own Dokuwiki template.//
  
-  - Copy the two sidebar files, //tplfn_sidebar.php// & //sidebar.css// in //template-sidebar-rc2006-09-28.zip//, to your template folder.+  - Copy the two sidebar files, //tplfn_sidebar.php// & //sidebar.css// in //template-sidebar-rc2006-09-28.zip//((http://wiki.jalakai.co.uk/dokuwiki/doku.php/start)), to your template folder.
   - Edit //tplfn_sidebar.php//, uncomment line 14~18, and modify content to you want.((額外需要的修改))    - Edit //tplfn_sidebar.php//, uncomment line 14~18, and modify content to you want.((額外需要的修改)) 
   - Make the following additions/changes to your template's //main.php// file:   - Make the following additions/changes to your template's //main.php// file:
行 18: 行 21:
 </code> </code>
     * Change the ''<body>'' tag to <code html><body class="<?php echo $sidebar_class; ?>"></code>Note: If your ''<body>'' tag already has a class modify the ''body'' tag as to look similar to:<code html><body class="myclass <?php echo $sidebar_class; ?>"></code>.      * Change the ''<body>'' tag to <code html><body class="<?php echo $sidebar_class; ?>"></code>Note: If your ''<body>'' tag already has a class modify the ''body'' tag as to look similar to:<code html><body class="myclass <?php echo $sidebar_class; ?>"></code>. 
-    * At the appropriate place within your template add the following line to display the sidebar: <code><div id="sidebar"><?php tpl_sidebar_content(); ?></div></code> The sidebar comes styled so that the above line can be placed between the closing ''</div>'' of ''div.content'' and ''<div class='clearer'>&nbsp;</div>''+    * At the appropriate place within your template add the following line((網頁原本只寫 tpl_sidebar(),不過 tplfn_sidebar.php 裡面沒有這個函式 )) to display the sidebar: <code><div id="sidebar"><?php tpl_sidebar_content(); ?></div></code> The sidebar comes styled so that the above line can be placed between the closing ''</div>'' of ''div.content'' and ''<div class='clearer'>&nbsp;</div>''
   - alter the sidebar styles as desired.   - alter the sidebar styles as desired.
  
wiki/sidebar.1162700753.txt.gz · 上一次變更: (外部編輯)