THIS CONTRIB HASN’T BEEN TESTED WITH P4A 2.0!!
P4A_Filesystem_Navigator: tree filesystem esploration widget.
P4A_Filesystem_Navigator is really useful when you need to draw a tree navigation structure stored on a filesystem.
The tipical situation is when you’re managing a file repository (such as when creating photo galleries).
Without files in a folder:
With some files:
$this->build("p4a_filesystem_navigator", "navigator"); $this->navigator->files->enablePreview(); // enable a preview link to open files $this->navigator->files->no_files_message = "No files in this folder"; $this->navigator->folders->no_folders_message = "No folders"; $this->navigator->folders->collapse(); // If you want to open only the currently selected folder $this->navigator->f_folders->setTitle("Folders"); $this->navigator->f_files->setTitle("Files"); $this->navigator->folders->create_folder_button->setValue("Create"); $this->navigator->files->upload_field->setLabel("Upload a file");
now you can anchor your P4A_Filesystem_Navigator in a P4A_Frame or where you want.
$this->frame->anchor($this->navigator);