[svlug] menus in debian

Joey Hess joeyh at debian.org
Thu May 4 14:53:15 PDT 2000

Erik Steffl wrote:
>   any comments on sorting/ordering? I don't care about most of the
> menus, but the programs I plan to add to the highest level should be (=I
> would like them to be) in any order I like, for example:
>   xterm
>   netscape
>   xisp
>   the only way I see it possible is to actually have a menu like:
>   01 xterm
>   02 netscape
>   03 xisp
>   did I miss something in docs?

You can add another field to the menu items, with whatever name you like,
let's say it's called priority. Then add this line to

sort=ifelse($priority, $priority, "9")

This has the result of sorting things so items with a low priority sort to the
top, and items with no priority default to priority 9 and sort to the bottom.

(Note that it compares the strings alphabetically, not numerically.)

see shy jo, who wishes menu-methods used perl

More information about the svlug mailing list