History: MultiLevelMenus
Preview of version: 1
- «
- »
This solution is by xia (Forum post
). 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:
1. Open templates/tiki-admin_menu_options.tpl
Find:
<option value="o" {if $type eq 'o'}selected="selected"{/if}>{tr}option{/tr}</option>
Add below:
<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:
if ($cd["type"] == 'o' and $indented) { $output.= ".";
Add below:
} 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.
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.
You can check the live demo at http://sridharkatakam.com/tiki/
.
History
| Information | Version | |||||
|---|---|---|---|---|---|---|
| Gary Cunningham-Lee Missing tree images can be found in 1.9.5 directory, not 1.9.4. | 8 | |||||
| Gary Cunningham-Lee 1.9.4 procedure and new demo link added. | 7 | |||||
| luci | 6 | |||||
| Marc Laporte ading to category | 5 | |||||
| Michael Davey | 4 | |||||
| Michael Davey integrated my initial top menus notes into the document flow using siridhar's images | 3 | |||||
| Michael Davey | 2 | |||||
| Sridhar Katakam | 1 | |||||