This topic is locked
[SOLVED]

collapsing/expanding tree menue via title

6/12/2011 2:16:44 PM
PHPRunner General questions
M
mickna author

For all who also searched for a solution....

It is really rough, but it works for me.

However, I have a simple menu structure...
Problem: Tree menu collapse/ expand only with the small "+" sign. A normal behaviour of a user would be to click on the title and expects the menu will collapse and/or expand.
Open your path to phprunner (c:/Program Files/PHPRunner5.3/templates/layouts/yourLayout e.g. Madrid)

Make a copy of menueitem.htm! Strongly recommend, if there is something wrong with my solution, or if you wanna switch back
delete all inside that file

copy&paste:



##if @menu.type!="Separator"##

##if @BUILDER.InlineMenu##

{BEGIN item##@menu.id##_groupimage}<span><img alt="*" src="include/img/plus.gif" class="pmimg" border=0> {BEGIN needcurrent_item}<a {$item##@menu.id##_menulink_attrs} class='{BEGIN item##@menu.id##_current}highlight-tablesearch current{END item##@menu.id##_current}

{BEGIN item##@menu.id##_notcurrent}tablelinkssearch{END item##@menu.id##_notcurrent}' >

##if !@BUILDER.InlineMenu##

<img alt="*" src='include/img/arrow_search{BEGIN item##@menu.id##_current}2{END item##@menu.id##_current}.gif' border="0">

##endif##

{$item##@menu.id##_title}</a>

{END needcurrent_item}</span>{END item##@menu.id##_groupimage}

{BEGIN item##@menu.id##_itemimage}<img alt="*" src='include/img/arrow_search{BEGIN needcurrent_item}{BEGIN item##@menu.id##_current}2{END item##@menu.id##_current}{END needcurrent_item}.gif' border=0> {BEGIN needcurrent_item}<a {$item##@menu.id##_menulink_attrs} class='{BEGIN item##@menu.id##_current}highlight-tablesearch current{END item##@menu.id##_current}

{BEGIN item##@menu.id##_notcurrent}tablelinkssearch{END item##@menu.id##_notcurrent}' >

##if !@BUILDER.InlineMenu##

<img alt="*" src='include/img/arrow_search{BEGIN item##@menu.id##_current}2{END item##@menu.id##_current}.gif' border="0">

##endif##

{$item##@menu.id##_title}</a>

{END needcurrent_item}{END item##@menu.id##_itemimage}

##endif##

{BEGIN notneedcurrent_item}

<a {$item##@menu.id##_menulink_attrs} class="tablelinks">

##if !@BUILDER.InlineMenu##

<img alt="*" src="include/img/arrow_search.gif" border=0>##endif##{$item##@menu.id##_title}</a>{END notneedcurrent_item}

##else##

{$item##@menu.id##_separator}

##endif##


Save &rebuild your project.
I realized, that the main title will work like expected if he is still included between the <span> tags from the plus sign.
May this helps?

cheers,

mickna