cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation Tree to Auto Collapse When Another Root Node is Expended

0 Kudos

Hi all,

I am very new to portal development and customization and would like to ask how can we achieve to auto collapse a root node when another root node is expended so that only one node will be opened each time. Something like below.

  

Is this achievable? I was looking into the LightDetailedNavigationTree.jsp file but I was not successful in changing it for this to work.

Any advice are greatly appreciated.

Thank you.

Regards,

Amanda

Accepted Solutions (1)

Accepted Solutions (1)

saar_dagan
Employee
Employee
0 Kudos


Hi Amanda,

Using the SAP API's this cannot be acheived. however, it is very simply to customize the code in order to do so.

In javascript all you need to do is get the selected treeItem, and then bind an onClick event that on change selected tree item triggers the click on the icon of the previous selected tree item in order to close it.

This should be simple enough.

BR,

Saar

0 Kudos

Hi Saar,

May I know where can I find this javascript file or where can I insert this block of code to achieve the above requirement? Which file path?

Thank you very much for your advice.

Best regards,

Joyce

saar_dagan
Employee
Employee
0 Kudos

Hi Amanda and Joyce,

You can find the file: detailedNavTree.js which is in charge of the detailed navigation tree (DTN)

under com.sap.portal.navigation.detailedtree

hope this helps,

Saar

Former Member
0 Kudos

Hi Saar,

Thank you very much for this, it really helps. I will give it a try now.

Best regards,

Amanda Ho

Answers (0)