Wednesday, 31 October 2018

How to create a nested menu using CSV file content

I need to use a CSV file for creating a webpage menu structure.

Can anyone please help me to create a nested menu in Jacascript using the given CSV structure?

The columns are: Level, Menu name, URL

0;"Service";
1;"Service 1";"http://some-url-1.com"
1;"Service 2";"http://some-url-2.com"
0;"Sales";
1;"Sales 1";"http://some-url-3.com"
1;"Sales 2";"http://some-url-4.com"
1;"Sales 3";
2;"Sales 3 Sub 1";"http://some-ulr-5.com";
0;"Development";"http://some-url-6.com"
0;"Internet";
1;"Internet 1";
2;"Internet 1 Sub 1";"http://some-url-7.com";

The first column shows the menu levels. 0- root level 1- first level 2- second level

Also the order of the menu items should be exactly as given in the CSV file.



from How to create a nested menu using CSV file content

No comments:

Post a Comment