Posted by rigga on 07/08/05 21:08
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*
menuitem2
menuitem3
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
Navigation:
[Reply to this message]
|