I'm trying to achieve the following but I can't really figure out how to go about it:
I have a menu on a website that uses a PageTree control (there is no top menu). The sort order in the menu is set using the built-in sort options, e.g in alphabetical order or according to sort index. The tricky part is that depending on which top-level menu option that is selected, I want to move that item to the top of the menu, but leaving the other options sorted according to the selected sort order.
Here is a schematic example
The menu first looks like this if an alphabetical sort order has been selected:
- Apples
- Bananas
- Lemons
- Oranges 0
If a visitor clicks on "Lemons 0" the sorting of the menu should look like this:
- Lemons (selected and expanded)
-- Lemons sub 1
-- Lemons sub 2
-- etc
- Apples
- Bananas
- Oranges
Please, can anyone help me? Can it be done at all? If it's impossible I'd appreciate that info so that I can tell my client not to expect miracles...
Thanks!
I eventually came up with a solution using two PageTree controls and filters. In the first PageTree control I remove all pages that do not have a certain value (defined as a dynamic property), and in the second I do the reverse filtering. Less elegant than an advanced sort filter, but very simple to implement.