Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function: multi-level navigation. / Plugin for version 2!
#5
Texta Wrote:It's sorted the other way round then the GS build-in function - the page with the highest priority get's displayed at the end of the list.
exmethix Wrote:Anyway it is not working atm. As Texta says the Navigation order is now reversed.
This is odd. I better run some tests on that and will report back.

It is very weird because I use the same sorting function as get_navigation() uses. The official function uses this:
Code:
$pagesSorted = subval_sort($pagesArray,'menuOrder');
And I use this:
Code:
$menu = subval_sort($data->xpath('//*[menuStatus="Y"][parent=""]'),'menuOrder');
Same function is used to sort the elements, subval_sort(), which I did not change myself.

Texta Wrote:It would be really usefull to have some 'class' added to the list and the submenu list, too. Because
<li class="parent"> is only added to the direct-parent of the sub-page, when I'm on a sub-page.
All the other times, there's no class added - strangely enough. Because in your example, I see at least the <li class="parent"> set correctly.
This is due to the way I use it. I wanted to be able to give alternative styling to the currently active link, and possibly to its parent. As all the other lists, to me, seem like standard lists and can therefore easily be styled with CSS by targeting them by parent:
Code:
ul { /* menu style. */ }
ul ul { /* sub-menu style. */ }
But I can add this to the script, hang on, I'm fixing another error just now (it doesn't close the li-elements, this doesn't matter for HTML but does for xHTML.)

exmethix Wrote:The second problem is that my subpages are not displayed when i hold the mouse over a parentpage.

Should'nt it do so?
No, it shouldn't. It should already be displaying all your sub-menus by default. It is up to you to hide them and make them pop-up on mouse over.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Function: multi-level navigation. / Plugin for version 2! - by Zegnåt - 2009-11-17, 06:33:42



Users browsing this thread: 3 Guest(s)