Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Navigation plugin ====== [[doku>plugin:navi|Navigation plugin page]] This plugin is used in the wiki sidebar to automate the opening and closing of its link nodes depending on which page the user is currently viewing. Absent this, the sidebar can be populated with lists of links as any page might, but it would either be static for all pages or require a different sidebar page for each namespace to achieve a more dynamic effect. ===== Basic use ===== In HârnWiki, there is one [[:sidebar]] page for the entire wiki. Its contents are simply two lines. <code> ~~NOCACHE~~ {{navi>navilist?ns}} </code> The first disables caching to ensure that the page is rendered anew each time for each user. Otherwise, the node configuration from the previous page would persist while viewing the current one. The second line invokes the plugin and links the page, [[:navilist]], for the list of links comprising the sidebar's content. It further uses the ''ns'' option to use the namespace(s) of the current page to help inform which nodes should be closed or open. This ''navilist'' page may hold just one standard list of links, though it may be nested to the depths desired to populate different nodes. At the time of this writing, the list begins like this, and one can see how the nested levels correspond to nodes that can open and close on the sidebar. <code> * [[https://www.lythia.com|Lýthia.com home]] * [[start|HârnWiki welcome]] * [[https://www.lythia.com/forum/|HârnForum]] * [[harn:]] * [[harn:azadmere:]] * [[harn:azadmere:azadmere_city]] * [[harn:azadmere:habe]] * [[harn:azadmere:zerhun]] * [[harn:chybisa:]] * [[harn:chybisa:burzyn]] ... </code> Links within the wiki work best and others are iffy. This is why the external links to [[https://www.lythia.com|Lýthia.com home]] and [[https://www.lythia.com/forum/|HârnForum]] are separated by the link to the wiki ''start'' page. Otherwise, the first doesn't show up at all. ===== CSS customization ===== Previously, there was a text formatting issue when this plugin was used within the ''Bootstrap3'' template. Closed nodes appeared larger and bolder than other items. This was eventually corrected but only for the ''%%#dokuwiki__aside%%'' element specifically. In HârnWiki, this plugin is also used in the right sidebar, the ''%%#dokuwiki__rightaside%%'', within the ''credits:'' namespace. To correct the appearance of those nodes, the CSS fix was copied from ''/lib/plugins/navi/style.less'', modified, and added to ''/lib/tpl/harnstrap3/css/plugins/navi.css''. wiki/navigation_plugin.txt Last modified: 2023/02/18 06:44by suedunham