the active part needs to display first with all its sub menus. Alternatively i could order by Id, what could do the trick is i oder the parent depending on the Child.Id. That could make the trick what do you think ?
Can't see why it wouldn't work. Here is my suggested logic applied to your <ul> (putting your check in for the current node). I've not syntax checked it so might need a little tweaking)
OrdeBy Active Menu Content
Is it possible to Order a list of content in a subNavigation depending on the active state ?
Having a list of content and sub content within them
Content 1
sub
sub
sub
Content 2
sub
sub
Content 3
sub sub sub
So if am on sub content 2 i would like the display to Order like this
You could just loop through the sub items twice.
Hi Matthew,
Not sure if this will do the trick though.....let me get back to you.
Here is my source code btw
the active part needs to display first with all its sub menus. Alternatively i could order by Id, what could do the trick is i oder the parent depending on the Child.Id. That could make the trick what do you think ?
Can't see why it wouldn't work. Here is my suggested logic applied to your <ul> (putting your check in for the current node). I've not syntax checked it so might need a little tweaking)
Am getting an error while saving :The name 'pass' does not exist....
My mistake, try:
@for(int pass=0; ...
Got it working Matthew,
However i the main content folder needed to move up first instead of the sub contents. But got it working.
The only thing i needed to add the another for loop to display the other remaining descedants. Many thanks for your help though.
//fuji
is working on a reply...