Reply to Re: Dynamic MySQL Nav Menu sorting

Your name:

Reply:


Posted by Angelos on 11/17/05 11:51

I do this all the time.
>
> In pseudo code:
>
> $position=0;
> foreach ($menu as $m){
> $position++;
> $uplink = "admin.php?move=$m[id]&to=" ($position-1);
> $downlink = "admin.php?move=$m[id]&to=" ($position+1);
>
> print "(uplink icon) (downlink icon) row data....<br />";
> }
>
>
> Then you update the sortorder field when either link is clicked. Remember
> to
> update the field that it is moved TO so it is moved down/up respectively.
>
> Of course, if the row is the first or the last, you shouldn't have either
> a
> uplink or downlink.
>
> Plus, if you have a hierarchical menu (like I do), you need to keep track
> of
> the position number relative to the current hierarchy leve and send that
> along
> with the query (i.e. move=12&to=3&mother=23)
>
Now we are talking....
Nice One Sandman. ... I'll try that today ;-)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация