Loading...
 
Skip to main content

History: MultiLevelMenus

Preview of version: 1

This solution is by xia (Forum postQuestion). I am merely documenting it here in the wiki.

Tikiwiki version: 1.8.5.

Let's say we want to have a menu that's collapsed by default. Upon expanding it should be like this:

Image


1. Open templates/tiki-admin_menu_options.tpl

Find:

Copy to clipboard
<option value="o" {if $type eq 'o'}selected="selected"{/if}>{tr}option{/tr}</option>


Add below:

Copy to clipboard
<option value="p" {if $type eq 'p'}selected="selected"{/if}>{tr}submenu1{/tr}</option> <option value="q" {if $type eq 'q'}selected="selected"{/if}>{tr}submenu2{/tr}</option>


('p', 'q', 'submenu1', 'submenu2' can be any names you choose)

Save and close.

2. Open lib/smarty_tiki/function.phplayers.php

Find:

Copy to clipboard
if ($cd["type"] == 'o' and $indented) { $output.= ".";


Add below:

Copy to clipboard
} elseif ($cd["type"] == 'p') { $output.= ".."; } elseif ($cd["type"] == 'q') { $output.= "...";


Save and close.

3. Click on 'Admin' menu and then 'Features'. Tick 'PhpLayers Dynamic menus' and press 'Change preferences' button.

4. Admin -> Menus. Create a new menu of 'dynamic collapsed' type. Configure the menu to add menu items.

Image


5. Admin -> Modules. Scroll down to 'Create new user module' section. Give it a name, title. The latest menu we just created should be selected for 'phpLayersMenus:' drop-down. Click on 'use phplayermenu' and press 'create/edit'.

6. Assign the module to set it left or right at a desired order.

Image

Image

Image

Image


You can check the live demo at http://sridharkatakam.com/tiki/Question.

History

Information Version
Gary Cunningham-Lee Missing tree images can be found in 1.9.5 directory, not 1.9.4. 8
View
Gary Cunningham-Lee 1.9.4 procedure and new demo link added. 7
View
luci 6
View
Marc Laporte ading to category 5
View
Michael Davey 4
View
Michael Davey integrated my initial top menus notes into the document flow using siridhar's images 3
View
Michael Davey 2
View
Sridhar Katakam 1
View