DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:topbarsyntax

topbarsyntax Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Delivers horizontal/vertical, css based menu on DokuWiki page wherever you want to have it

Last updated on
2016-06-02
Provides
Syntax
Repository
Source

Tagged with css, menu, template

Intro

The top bar syntax plugin was developed to illustrate the behaiviour caused by the instructions of an article How to integrate the CSS Menu into a template.
The initial code base was taken from the related function of Michael Kliers template_simple.

To see the plugin in action please visit: fcon- examples.FIXME

Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Examples/Usage

Please be aware that this is a plugin and not the template integration as described within the mentioned article !

There are two parameters. The first defines the width of the menu. There are all css compatible width values allowed (like px, %, em).

The second parameter configures the menu orientation (h = horizontal, vl = vertical, left sided, vr = vertical, right sided). The vertical menu has the possibility of displaying text right/left beside it due to css is set to float:left/right.

As explained for the template integration, you have to create (and maintain) the link list of your navigation. Therfore store a text file to the pages-root folder of your DokuWiki. The menu items are unordered list items followed by the internal dokuwiki link (all as DW-syntax). There it is necessary to enter an empty line between the level one to tell the php-code that a new menu tab item to be created. If you want to have different menues for namespaces, then create a topbar.txt file within the namespace. If the syntax is called it will look at first into current namespace for the topbar.txt file. If there is no such file it will look into pages-root directory and takes that one.

Syntax

horizntal menu bar syntax, valid expressions

- a horizontal menu of 850px width
{{topbarsyntax>850px,h}}%%  

- a horizontal menu of 100% width
{{topbarsyntax>,h}}%%  

vertical menu bar syntax, valid expressions

- a vertical, left sided menu of 12em width and auto height
{{topbarsyntax>12em,vl}}

- a vertical, right sided menu, with css defined width and auto height
{{topbarsyntax>,vr}}

Configuration and Settings

Finally you have to create the link list of your navigation. Therfore store a text file to the pages-root folder of your DokuWiki. The menu items are unordered list items followed by the internal dokuwiki link (all as DW-syntax). There it is necessary to enter an empty line between the level one to tell the php-code that a new menu tab item to be created. For the fcon page this would look similar to following:

topbar.txt
  * [[:start|Home]]
 
  * Plugins
    * Issue Tracker
      * [[issuetracker:descr|Description]]
      * [[issuetracker:report|Report an Issue]]
      * [[issuetracker:issuelist|Issue List]]
    * Training  
      * [[training:start|Overview]]
      * [[training:authors|Author Training]]
      * [[training:admins|Admin Training]] 
    * NEWS System  
      * [[news:how_to_set-up|Description]]
      * [[news:news|News]]
      * [[news:writenews|Write News]]

[also CSS style tips]

Development

[downloadable blocks, development comments]

Change Log

Known Bugs and Issues

  • Fatal error: Declaration of syntax_plugin_topbarsyntax::handle($match, $state, $pos, Doku_Handler &$handler) must be compatible with dokuwiki\Extension\SyntaxPlugin::handle($match, $state, $pos, Doku_Handler $handler)
    • Solution: Edit the file Syntax.php then change
      • Line 45 from:
        • function handle($match, $state, $pos, Doku_Handler $handler) {
      • in
        • function handle($match, $state, $pos, Doku_Handler &$handler) {
      • Line 59 from:
        • function render($mode, Doku_Renderer $renderer, $data) {
          • in
        • function render($mode, Doku_Renderer &$renderer, $data) {
          • or try viceversa — florious 2022-01-17 01:30

ToDo/Wish List

[developers roadmap]

FAQ

[discussions should ideally be deleted and turned into FAQ entries along the way]

Sites using this Plugin

You got this plugin up and running? You have got a demo page? Put a link here!
Feel free to add yours here:

Discussion

Please use only the DokuWiki Forum for discussion and TopBarMenu reports to raise yourissues. You can mention it here but this page is not regularily tracked and if something is solved it will be cleaned from this page (better to use the forum due to automated notifications).

plugin/topbarsyntax.txt · Last modified: 2023-03-29 23:21 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki