Loading...
 
Features / Usability

Features / Usability


Re: Sub trees in PHPLayers

posts: 14 New Zealand

After a few days of deciphering code I found a solution smile.


in \templates\tiki-admin_options.tpl find

Copy to clipboard
option value="s" {if $type eq 's'}selected="selected"{/if}>{tr}section{/tr} /option> (line 27)

add this line beneath it:

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

then in \lib\smarty_tiki\function.phplayers.php find:

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

add these two lines beneath it:

Copy to clipboard
} 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:

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


(i had to take off the < to make it show up here)

posts: 38 United States

> After a few days of deciphering code I found a solution smile.

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.

posts: 157 United States

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.