Loading...
 

Menu Topics

Menu Revamp, Coding, what has to be done ...

Refactoring Tikis menu system

We need to refactor the Tiki menu system for reasons:

more and different classes in Bootstrap menus

The new Bootstrap responsive menues are much more sophisticated with more than one menu-item-array and different levels
The actual men-item-array from tiki-admin_modules.php simply does not at all fit to the bootstrap.css and either not to the bootstrap.js.
We either need to develop a new kind of menu, or - what I preferred, if coders agreed - we extend the existing menus to the opportunities and requirements we see with Bootstrap.

need more flexibility

The actual Tiki menu system is easy to use, reliable and very good in what it can provide.
But in the end of the day it is not flexible enough, to provode us width certain new state of the art menu item effects:

Example: "Mega Menus" alike Amazon for several submenus or grafics or arbitrary text and in a menu item (nearly there with "use WikiSyntax in menus", but difficult to style and no translation of the whole menu if the preference is active).
=> Can the Bootstrap menu provide this?

only two levels in Bootstrap menus (the dark side)

Marc Laporte mentioned, that the Bootstrap Navigation only knows two menu levels, whilst Tikis menu system knows at least five levels -> https://github.com/twbs/bootstrap/issues/424

superfish

Do we need "superfish" for wikistructure-menus?
LPH said in the dev-list -1 to keep superfish.
There is no point to lose wikistructure menu or not to have a multilevel standard menu ... so is the Bootstrap menu a feasable replacement, or a good but limited supplement to Tikis existing abilities?

please keep superfish!

Bootstrap heavily relies on JavaScript when it comes to dropdown menus and all sort of things that flip or collapse. The easiest way to have a fallback at the moment seems to be to keep css-menus. There is no fallback => switch off JS and no access to most of the standard Bootstrap navigation. Midterm or longterm it might be an option to get to the Bootstrap community and to agree and/or collaborate with them Bootstrap native fallback (graceciously degrading or how it is called).
=> So for now +1 to keep superfish and -1 to seize it ... actually we need some basic cssmenu css back to our Tiki13 basic css to prevent cssmenus being just transparent ... adding of Bootstrap classes possible or adding of custom css necessary?

By the way, somebody added a nice fallback option with two fields to the menu module (bootstrap = n / use cssmenu if bootstrap off = y)! Thank you!

So what to do?

  • check vertical menu in bootstrap
    Any joy with vertical menus in Tiki based on Bootstrap up to now?
    no point not to have vertical menus anymore.
  • just add bs-nav-menu as option?
    add a new bootstrap menu, but keep classic css menu as option besides wikistructure menu and
    that means to keep superfish, what has a -1 by LPH by this time
  • extend the code of the bootstraps menu to our needs?
    would that be any possible and who has the capacity?
    mind to be independant of javaScript at least of wide screen mode?
    accept reliability on JavaScript based menu in mobile mode without
    alternative classic cssmenu
  • complete new development
    write a complete new menu replacing both: classic (including wikistructure) and bootstrap .. combining classic and bootstrap advantages and preventing from both's disadvantages?
    do we have the capacity?

Update from TikiFestBootstrap Ottawa

The Bootstrap menu, as component calle "Navbar", is different to the standard Tiki "Module_Menu".

In Tiki we setup one menu with a list of menu items and apply the Id number of the menu (or alternatively a wikistructure) to the module_menu.
Then certain parameters can be set to the module.
Alternatively the smarty plugin of the menu including the parameters inline the smarty plugin might be used in a custom module.

In Bootstrap the Navbar is a bit more sophisticated in the way, that more components, for ex. a search bar, a left and a right menu can be nested in the Navbar. This would easily replicaple in a custom module, as Bootstrap is made simply with plain HTML, but we have no corresponding Plugin or Module in Tiki.

We need so a new module in Tiki called module_navbar (referred by jonnyb as the fluffy thing)


The Navbar (module_navbar) seems to be kind of a "supermodule" that can nest other modules, like the existing module_menu or searchbar.

In the 21st Nov webinar we agreed, that it would not be appropriate to simply use a module zine (topbar) for that.

The "supermodule" Navbar would be kind of a movable mixture between a mobile zone and a module.
On the one hand it should appear in the modules list and admins could apply the "supermodule" to any module zone.
On the other hand it should be possible to apply modules to the created "supermodule" in a similar way than to a module zone.

The Navbar should contain the following elements (minimum):

  • navbar-header / navbar-brand

This is NOT the module title and should still appear, when the Navbar is in nobox=y mode. The Navbar-Header needs a URL parameter, as it is a single top menu item.

  • navbar-left

left menu

  • navbar-something

<-> must review to find the right name
space for components like search_bar

  • navbar-right

right menu

  • navbar-collapse

the stripes which get visible instead of the menus if in mobile mode?

It might be needed some menu or module code extension, to "deliver" just <ul> and <li>, but with the right classes:

<ul class="nav navbar-nav">
            <li class="dropdown">
              <a class="dropdown-toggle" data-toggle="dropdown" href="URL" id="Id">Linktext<span class=""></span></a>
              <ul class="dropdown-menu" aria-labelledby="themes">
                <li><a tabindex="-1" href="URL">Linktext</a></li>
                ...

Example HTML Code


Here I have added an example of a typical Bootstrap responsive horizontal navigation menu.

Temporary notice:
My site is accidentially down (wrecked it whilst the TikiFest) and only few time to fix it.

It is the todays status of the main navigation of bootstrapped.fabricius.me and technically borrowed from bootswatch.com
It is plain HTML code in a Tiki custom menu applied to the header.

To review just click on the fading link below:

NavBar HTML Code!
<div class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <a href="HomePage" class="navbar-brand">bootstrapped</a>
          <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
        </div>
        <div class="navbar-collapse collapse" id="navbar-main">
          <ul class="nav navbar-nav cssmenu_horiz">
            <li class="dropdown">
              <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes">Themes <span class=""></span></a>
              <ul class="dropdown-menu" aria-labelledby="themes">
                <li><a tabindex="-1" href="HomePage">Home</a></li>
                <li><a tabindex="-1" href="Amelia">Amelia</a></li>
                <li><a tabindex="-1" href="Bootstrap">Bootstrap (=default)</a></li>
                <li><a tabindex="-1" href="Cerulean">Cerulean</a></li>
                <li><a tabindex="-1" href="Cosmo">Cosmo</a></li>
                <li><a tabindex="-1" href="Cyborg">Cyborg</a></li>
                <li><a tabindex="-1" href="Flatly">Flatly</a></li>
                <li><a tabindex="-1" href="Journal">Journal</a></li>
                <li><a tabindex="-1" href="Readable">Readable</a></li>
                <li><a tabindex="-1" href="Simplex">Simplex</a></li>
                <li><a tabindex="-1" href="Slate">Slate</a></li>
                <li><a tabindex="-1" href="Spacelab">Spacelab</a></li>
                <li><a tabindex="-1" href="United">United</a></li>
              </ul>
            </li>
            <li>
              <a href="../help/">Help</a>
            </li>
            <li>
              <a href="http://news.bootswatch.com">Blog</a>
            </li>

          </ul>
 
          <ul class="nav navbar-nav navbar-right">
            <li><a href="http://bootswatch.com" target="_blank">Bootswatch</a></li>
          </ul>

        </div>
      </div>
    </div>

Related


Alias

BS Menu


Page last modified on Thursday 28 of August, 2014 23:15:03 GMT

Switch Theme

Layout

Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other big news!
Contribute to Tiki

Site Config