.. include:: /Includes.rst.txt .. index:: Templates Files; Resources/Private/Templates ================= Adding a template ================= In Extbase frontend templates are stored by default in the subdirectory :file:`Resources/Private/Templates/` provided by an extension. This local path is written as :file:`EXT:store_inventory/Resources/Private/Templates` in the setup. The name of the subdirectory below the :file:`Templates/` folder is derived from the corresponding controller name (without the `Controller` suffix). The class name :php:`\T3docs\StoreInventory\Controller\StoreInventoryController` will result in the directory name :file:`StoreInventory/`. The directory :file:`StoreInventory/` contains the template file for our list view. As the list action renders our list view, the template must be named :file:`List.html`. This is the action name, without the "action" suffix. .. index:: Templates; Fluid The Fluid template ================== :file:`EXT:store_inventory/Resources/Private/Templates/StoreInventory/List.html` looks like this: .. code-block:: html
Product name Product description Quantity
{product.name} {product.description} {product.quantity}
The inventory is rendered as a table. The template gets access to the array of products which have been assigned to the view (:php:`$this->view->assign('products', $products)`) with :html:`{products}`. Tags starting with :html:`