How can I return the content of my directory in a customized manner?You may find views helpful. See the documentation on adding a view and then displaying the view.