wiki:sidebar
這是本文件的舊版!
http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/addsidebar
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.
- Copy the two sidebar files, tplfn_sidebar.php & sidebar.css in template-sidebar-rc2006-09-28.zip1), to your template folder.
- Edit tplfn_sidebar.php, uncomment line 14~18, and modify content to you want.2)
- Make the following additions/changes to your template's main.php file:
- Near the top of your template's main.php file and within the
<?php ?>tags add the following:// include functions that provide sidebar functionality @require_once('tplfn_sidebar.php'); // determine the sidebar class $sidebar_class = "sidebar_{$conf['sidebar']['layout']}_{$conf['sidebar']['orientation']}";
- Within the
<head>element and adjacent to any existing style sheet<link>add the following line:<link rel="stylesheet" media="screen" type="text/css" href="<?php echo DOKU_TPL; ?>sidebar.css" /> - At the appropriate place within your template add the following line3) to display the sidebar:
<div id="sidebar"><?php tpl_sidebar_content(); ?></div>
The sidebar comes styled so that the above line can be placed between the closing
</div>ofdiv.contentand<div class='clearer'> </div>
- alter the sidebar styles as desired.
wiki/sidebar.1162705869.txt.gz · 上一次變更: (外部編輯)
