Menu com submenu me ajudem!

Galera estou abrindo este topico pois muitas pessoa devem ter duvidas sobre isso:

Bom a Minha duvida é o seguinte, estou seguindo este topico:

http://www.yiiframework.com/wiki/61/ que fala para criar esta estrutura de tabela:

CREATE TABLE Hierarchy (

id int(11) NOT NULL auto_increment,

sort int(11) NOT NULL,

parent int(11) default NULL,

title varchar(255) default NULL,

PRIMARY KEY (id)

) ENGINE=InnoDB

Que o mesmo imprime o menu assim:


[b]* root[/b]

         * First Entry

         * Second Entry withoud Childs

                + Child of the third Entry

                      # Child of the Child of the third Entry

          o Third Entry

          o Child of the first Entry



Agora me diz para que serve o campo sort pois no topico mostra tudo (0) e eu precisava imprimir mais um topico entao que valor eu deveria colocar do (sort) para ficar assim:


[b]* root[/b]

          o First Entry

          o Second Entry withoud Childs

                + Child of the third Entry

                      # Child of the Child of the third Entry

          o Third Entry

          o Child of the first Entry

[b]* Segundo Topico[/b]

          o First Entry

          o Second Entry withoud Childs

[b]* Terceiro Topico[/b]

          o Second Entry withoud Childs

               + Child of the third Entry

Ha tenho outra duvida para completar este topico, no formulario de cadastro das categorias gostaria de em um DropDownList mais com uma configuraçao diferente tipo assim:


o root

   o First Entry

      o Second Entry withoud Childs

            o Child of the third Entry

            o Child of the Child of the third Entry

      o Third Entry

            o Child of the first Entry

o Segundo Topico

     o First Entry

     o Second Entry withoud Childs

o Terceiro Topico

     o Second Entry withoud Childs

     o Child of the third Entry

Mostrando o nivel do topico nesta lista.

Espero que alguem possa me ajudar pois ja quebrei a cabeça tentando fazer isso. valews

O soft não é exatamente um campo obrigatório para funcionar o tutorial, ele é apenas para, se no futuro, vc queira modificar a ordem do menu, ter esta opção. Como, para o exemplo não importa muito, o autor colocou o sort = 0 em tudo.