Sub trees in PHPLayers Posted by xia 25 Jan 2005 08:45 GMT-0000 posts: 14 Hi, is it possible to use PHP Layers extended tree functunality with tikiwiki? I would like to have a menu like this: Main + Sub + Second Sub Thanks, and keep up the great work developers
Posted by Gary Cunningham-Lee 26 Jan 2005 07:22 GMT-0000 posts: 4644 I think the problem is that Tiki itself doesn't provide for more than two levels: section and option. Tiki's menu code would have to have "subsection" level items for PHPLayers to find and use. Don't know what would be involved in making this modification, though. -- Gary
Posted by xia 30 Jan 2005 00:01 GMT-0000 posts: 14 After a few days of deciphering code I found a solution . in \templates\tiki-admin_options.tpl find option value="s" {if $type eq 's'}selected="selected"{/if}>{tr}section{/tr} /option> (line 27) add this line beneath it: option value="p" {if $type eq 'p'}selected="selected"{/if}>{tr}submenu{/tr} /option> then in \lib\smarty_tiki\function.phplayers.php find: if ($cd["type"] == 'o' and $indented) { (line 70) $output.= "."; add these two lines beneath it: } elseif ($cd["type"] == 'p') { $output.= ".."; and thats it! You can keep adding more sub menus by using a different value in the two files (p in this case) and put another . in the output in function.phplayers.php, eg: } elseif ($cd["type"] == 'r') { $output.= "..."; (i had to take off the < to make it show up here)
Posted by Marc Laporte 30 Jan 2005 06:33 GMT-0000 posts: 1602 Hi Xia! Can you show us a demo? Extra levels in the menus would be a welcome addition for Tiki 1.9 Thanks!! M ;-)
Posted by Sridhar Katakam 30 Jan 2005 10:25 GMT-0000 posts: 78 http://tikiwiki.org/tiki-index.php?page=MultiLevelMenus
Posted by Elizabeth Dalton 16 Aug 2005 03:27 GMT-0000 posts: 38 > After a few days of deciphering code I found a solution . Great solution. But where do the menus get their style from??? I couldn't find anything in the regular style sheets that would affect these trees. I checked the source of the resulting page and tried modifications to .phplm, .treemenudiv, and .phplmnormal, but couldn't see any changes. I'd like to make the text match the text in the other menus (smaller, same color, etc.) Any suggestions? e.d.
Posted by colorado 20 Aug 2005 01:08 GMT-0000 posts: 157 You can find those classes in the lib/phplayers folder, i.e. layerstreemenu.css --Colorado > Great solution. But where do the menus get their style from??? I couldn't find anything in the regular style sheets that would affect these trees. I checked the source of the resulting page and tried modifications to .phplm, .treemenudiv, and .phplmnormal, but couldn't see any changes. I'd like to make the text match the text in the other menus (smaller, same color, etc.) > > Any suggestions? > > e.d.