====== A Centered Perspective Template ====== ---- template ---- description : Designed like the ADC author : Anymorphic email : ja@anymorphic.com lastupdate : 2010-08-11 compatible : Anteater depends : conflicts : #sample similar : tags : simplistic minimal nice sidebar downloadurl : http://www.anymorphic.com/_media/downloads/a_centered_perspective.zip bugtracker : # eg. https://github.com/example/dokuwiki-plugin-sample/issues sourcerepo : # eg. https://github.com/example/dokuwiki-plugin-sample/ donationurl : # eg. https://www.paypal.com/... screenshot_img: https://trello.com/1/cards/658897d424150d1b6ff3b31b/attachments/6588981042672145c2af0f93/download/a_centered_perspective_template.png ---- The template features pulldown menus for the common toolbox of [[template:arctic|arctic]] and a menu based on the implementation of the navi-plugin. Just create an hierarchical list of links in the page ":menu". ==== How to get the menu ==== You have to create a page ":menu" where you put in all the links in a hierarchical Dokuwiki-Syntax-formatted list like so: * [[:start]] * [[:subpage1]] * [[:subpage2]] * [[:someOtherPage]] where then the links to "subpage1" and "subpage2" will only be visible when the visitor of you site is on the page "start", "subpage1" and "subpage", but not when he's on "someOtherPage". * Adding a link to the root namespace is not working. When within another namespace (say in page ns:foo), the link to :start gets to ns:start -- //Alberto Simões// - ambs at cpan.org * Yea, that is a bug. Somewhere in id "cleaning" the leading colon is lost. Messy code there that builds up navigation. To fix change tpl_functions.php lines 151ff to: $R->listcontent_open(); $isParent = preg_match('/^(\w*:)*'.$info['page'].'(:\w*)*$/', $INFO['id'])>0; if(($format == 'xhtml') && $isParent ) $R->doc .= ''; $R->internallink(':'.$info['page'],$info['title']); if(($format == 'xhtml') && $isParent) $R->doc .= ''; $R->listcontent_close();Then you can delete much code upwards that computes the now no longer used array $parent (did not work, anyway). Note that now all links are expected to be given from root on but that should be no problem. //akerbos 2010-Oct-22// ===== Download and Install ====== Use the following URL to download this template: * http://www.anymorphic.com/_media/downloads/a_centered_perspective.zip Refer to [[:template]] on how to install and use templates in DokuWiki. ===== Translations ===== ==== Japanese ==== ''/lang/ja/settings.php'' ===== Sites using this Template ===== * http://wikichichi.com * http://partedmagic.com/doku.php * http://sm.ingenieriamultimedia.org ===== Bugs? ===== ==== Firefox 3.6.8 bug ==== In Firefox 3.6.8, I had to comment out line 439 in the //this_design.css// for the trace menu at the bottom to work properly: .breadcrumbs { /*clear: both;*/ } Is this a general bug, or unique to Firefox? Yes, I did clear the browser cache and purged the Dokuwiki cache also before trying this... //Symon Bent 2010-Aug-27// ==== Menu ==== **Menu not showing up correctly.** **Fix:** Pages must exist to show up correctly in the menu. **Category with no subcategories removes the horizontal line border.** **Fix:** Open up this_design.css, find the line ".menu > ul > li > div > a {", change to ".menu > ul > li > div a {" ==== Menu and sidebar when using translation3 plugin ==== **Menu only works in the root namespace when using translation3 plugin.** I installed translation3 plugin and can not figure out how to force the template to read ns1:sidebar and ns1:menu when using ns1 language. The plugin uses two-letter iso language codes to change translations. Pages :menu and :sidebar work only from root. ==== Icons beside search box in Chrome & IE ==== In Chrome & IE, the icons beside the search box do not show up. FIXME **Fix:** Open **this_design.css**. In ".action-menu-title" add the following: .action-menu-title { font-family: 'Arial Unicode MS', 'Microsoft Sans Serif', 'Free Sans', 'Gentium Plus', 'Gentium Basic', Gentium, GentiumAlt, 'DejaVu Sans', 'DejaVu Serif', 'Free Serif', 'TITUS Cyberbit Basic', 'Bitstream Cyberbit', 'Bitstream CyberBase', 'Doulos SIL', Code2000, Code2001; ....(rest of css goes here) } **This doesn't seem to work for Chrome. It does work for IE. Any ideas on getting it to work in Chrome?** ==== Other ==== * On ACL installs, there is no 'Login' button showed for not logged in users when activating 'Closed Wiki' and 'Hide Wiki actions' I expect that 'Hide Wiki actions' still would show the login, otherwise I don't understand the use of that option ;) It also lacks the several 'subscribe' buttons? // Casper 2010-Sep-05// * FIXME Links inside the "menu" page break after entering a namespace. In other words after going into a namespace, all links in the menu sidebar break and will not successfully link back to the root namespace. * **Temporary Fix (quick and dirty):** replace following lines in **tpl_functions.php** - **line 54:** 'page' => cleanID($instructions[$i][1][0]), with this 'page' => ":".cleanID($instructions[$i][1][0]), - **line 152:** if(($format == 'xhtml') && (($info['page'] == $current) || in_array($info['page'],$parent))) with this if(($format == 'xhtml') && (($info['page'] == ":".$current) || in_array($info['page'],$parent))) * Fix: see [[#how_to_get_the_menu]] //akerbos 2010-Oct-22// * FIXME There is a bug in the menu system causing the menu items to be shown only once even if they occur more often in the menu. If links to the same page will occur more than once, only the first occurrence of that link will show in the menu in the place it occurs first. //Maurits Lamers October 17th 2010// * FIXME CSS only supports webkit browsers (e.g. -webkit-border-(radius|gradient)). * Inserting pictures does not work with the Release Candidate of dokuwiki. **MediaManager** shows, but no code is inserted in editor after click on picture. Uploading and deleting works. Is it a template problem or a dokuwiki-version problem? (fle, 2010-10-25) +1 same issue (cricketbird 2010-30-10) * Even though my :menu page is successfully showing in the sidebar, the :sidebar page (along with an edit button) still shows up below it. Deleting the :sidebar page just causes dummy text to show up in its place. Any way to permanently remove the :sidebar page area from the sidebar and show just the :menu? (cricketbird 2010-10-25) +1 same issue! (punjabi 2010-10-28) * Found the solution to last problem. Go to admin and for the sidebar page, replace the text "sidebar" by "menu" (punjabi 2010-10-28) --Thanks (cricketbird). --I tried the same and now the menu looks good but the sidebar text and edit button still show at the bottom. Any recommendations? Thanks a lot (benedetoula). * I found the solution to HIDE the edit button. Open the "this_layout.css" and insert: div.main_sidebar .secedit {display: none;} * FIXME The option "Show trace at the top of the page" doesn't seem to work, the Trace is shown at the bottom. Or is this option for something else and I have to change the template? //hagbard 2010-11-05// * I think there is a bad reference for the 1st sub-level "class". //by TM 2010-12-07//