I have a menu structure like this:
1. Option A
1.1 Option B
1.1.1 Option C
1.1.2 Option D
1.2 Option C
1.2.1 Option B
1.2.2 Option D
1.3 Option D
1.3.1 Option B
1.3.2 Option C
2. Option B
2.1 Option A
2.1.1 Option C
2.1.2 Option D
2.2 Option C
2.2.1 Option A
2.2.2 Option D
2.3 Option D
2.3.1 Option A
2.3.2 Option C
3. Option C
3.1 Option A
3.1.1 Option B
3.1.2 Option D
3.2 Option B
3.2.1 Option A
3.2.2 Option D
1.3 Option D
3.3.1 Option A
3.3.2 Option B
4. Option D
4.1 Option A
4.1.1 Option B
4.1.2 Option C
4.2 Option B
4.2.1 Option A
4.2.2 Option C
4.3 Option C
4.3.1 Option A
4.3.2 Option B
Why do I do such thing? - This menu is used to select a combination of options A,B,C,D
where sequence of selected options matters.
For Example: The user clicks on menu-item 2.3.1. That results in combination B-D-A
.
Now, you know how I currently do it theoretically. Actually, there are much more options to combine. But only three are to be combined at the same time.
The problem is that I have to create all menu-items (three levels deep) before the menu is shown.
Is there a way to add submenu-items just when they are needed (that is when they should be shown)?