P4A_DB_Navigator: a tree menu navigation widget having a P4A_DB_Source as data source.
P4A_DB_Navigator is really useful when you need to draw a tree navigation structure stored on a database.
The tipical situation is when you’re managing nested pages of a website and you need to navigate the structure to create and edit contents in an easy way.
$this->build("p4a_db_navigator", "navigator"); $this->navigator->setSource($your_db_source); $this->navigator->setRecursor("parent_id"); $this->navigator->setDescription("title"); $this->navigator->collapse(); //tell the navigator that you don't want "all expanded"
now you can anchor your P4A_DB_Navigator in a P4A_Fieldset or where you want.