== link:index.html[Index] -> link:modules.html[Modules] -> link:modules_handlers.html[Handlers]

Handler: Directory Listing
--------------------------

The **Only Listing** handler builds a list of directories and files
within the requested directory, but **does not allow you to download
its contents**. Refer to link:modules_handlers_common.html[List &
Send] for the opposite behavior.

[[listing]]
Parameters: Listing
~~~~~~~~~~~~~~~~~~~
[cols="20%,20%,60%",options="header"]
|====================================================================
|Parameters |Type    |Description
|`size`     |boolean |Optional. Display the size of files in the
                      listings. Default: `Enabled`.

|`date`     |boolean |Optional. Display the last modification date of
                      the files and directories in the listings.
                      Default: `Enabled`.

|`user`     |boolean |Optional. Display the owner of the files and
                      directories in the listings.
                      Default: `Disabled`.
|`group`    |boolean |Optional. Display the group ownership of the
                      files and directories in the listings.
                      Default `Disabled`.
|`symlinks` |boolean |Optional. Display symbolic links.
                      Default `Enabled`.
|====================================================================

[[theming]]
Parameters: Theming
~~~~~~~~~~~~~~~~~~~
[cols="20%,20%,60%",options="header"]
|====================================================================
|Parameters     |Type    |Description
|`theme`        |string  |Optional. The theme to use when displaying
                          the directory listings.
                          Default: `default`.
|`icon_dir`     |string  |Optional: Alternative path to a new icon
                          set.
|`notice_files` |string  |Optional: List of notice files to be
                          inserted.
|====================================================================

It is possible to change the default theme used when displaying the directory
listings.

It is also possible to create a new one::
+
----
   $ ls /usr/share/cherokee/themes/firefox3/
   entry.html  footer.html  header.html  theme.css
----
+
Simply create a new directory in the above mentioned path containing
the listed files and  you'll be able to select it in `cherokee-admin`.

[[examples]]
Examples
~~~~~~~~

This is just one of many possible configurations.

.Sample configuration
|====================================================================
|Field                   |Value
|Handler                 | `Only listing`
|Document Root           | None
|Show Size               | Enabled
|Show Date               | Enabled
|Show User               | Disabled
|Show Group              | Disabled
|Show Backup files       | Disabled
|Show Hidden files       | Disabled
|Allow symbolic links    | Enabled
|Redirect symbolic links | Disabled
|Theme                   | `default`
|====================================================================

.Sample configuration screenshot
image::media/images/admin_handler_onlylisting.png[Only listing configuration]

The output given by such configuration is a simple directory listing
that can be sorted by any of its columns.

image::media/images/admin_handler_onlylisting_ex.png[Only listing example]