Hi,
I am trying to code a menu for a webpage, the menu is broken up to groups
i.e:
Home
Group1
Â*menuitem1
Â*menuitem2
Â*menuitem3
Group2
Â*Â*menuitem1
Â*Â*menuitem2
Â*menuitem3
And so on.
What I want to achieve is that the groups are shown in a collapsed state
depending on the page which is currently being displayed i.e so it starts
out like this
Home
Group1
Group2
If you click on Group1 it loads the first menuitem page and highlights it
and redraws the page expanding that group i.e. (note * denotes highligthed)
Home
Group1
Â*Â*menuitem1
Â*Â*Â*menuitem2
Â*Â*Â*menuitem3 Â*
Group2
And the same would apply if you click on Group2 i.e:
Home
Group1
Group2
Â*Â*menuitem1
Â*Â*Â*Â*menuite m2
Â*Â*Â*Â*menuite m3Â*
What is the best way to go about this? I have coded it 'the long way' where
there is lots of duplication of code.
I hope this all makes sense and that I have explained it clearly.
I am new to php so would really appreciate your help as I am totally at a
loss on how to best do this.
Many thanks
Rigga