Note
This version of the guide covers the new PHP-based rendering of Documentation with the TYPO3 Documentation theme.
If the project you are looking at has a file Documentation/guides.xml it is using the new rendering.
Otherwise, consider to migrate the Documentation or head over to the legacy version of this guide: How to document, Sphinx based.
Directory tree
You can use the directive .. directory-
to make a nested list look like
an expandable directory tree. This is helpful in discussing file structure for
extensions or projects.
Example: A basic directory tree, two levels expanded
-
-
-
Default.html
-
WithoutHeader.html
-
-
-
Default.html
-
StartPage.html
-
TwoColumns.html
-
With_sidebar.html
-
-
-
Footer.html
-
Sidebar.html
-
Menu.html
-
-
.. directory-tree::
:level: 2
:show-file-icons: true
* EXT:my_sitepackage/Resources/Private/Templates/
* Layouts
* Default.html
* WithoutHeader.html
* Pages
* Default.html
* StartPage.html
* TwoColumns.html
* With_sidebar.html
* Partials
* Footer.html
* Sidebar.html
* Menu.html
Copied!
Example: A page tree with empty folders
-
Classes
-
-
Backend
-
-
Persistence
-
-
TCA
-
Ts
Config -
Typo
Script -
Icons.
php -
page.
tsconfig -
Services.
yaml -
user.
tsconfig
-
-
Documentation
-
-
-
Language
-
-
Public
-
-
Tests
-
composer.
json -
ext_
emconf. php -
ext_
localconf. php -
ext_
tables. sql
.. directory-tree::
* :path:`Classes`
* :path:`Configuration`
* :path:`Backend`
* :path:`Extbase`
* :path:`Persistence`
* :path:`TCA`
* :path:`TsConfig`
* :path:`TypoScript`
* :file:`Icons.php`
* :file:`page.tsconfig`
* :file:`Services.yaml`
* :file:`user.tsconfig`
* :path:`Documentation`
* :path:`Resources`
* :path:`Private`
* :path:`Language`
* :path:`Public`
* :path:`Tests`
* :file:`composer.json`
* :file:`ext_emconf.php`
* :file:`ext_localconf.php`
* :file:`ext_tables.sql`
Copied!
Properties
level
-
- Type
- int
- Default
- unlimited
Limit the levels of the tree initially shown expanded.
show-file-icons
-
- Type
- bool
- Default
- false
Display a folder icon beside each entry that has a sub-entry, a file icon otherwise.