.. include:: /Includes.rst.txt Adding a template ================= In Extbase frontend templates are stored in a subdirectory: :file:`EXT:store_inventory/Resources/Private/Templates` - if not configured otherwise. The name of the subdirectory in the :file:`Templates/` folder is derived from the corresponding controller name (without the `Controller` suffix). The class name :php:`\MyVendor\StoreInventory\Controller\StoreInventoryController` will result in the directory name :file:`StoreInventory/`. In the directory :file:`StoreInventory/` we can now create the template file for our list view. As our list view is rendered by the list action, the template should be :file:`List.html`. The action name, without the action suffix. :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. We can access the array of products we assigned to the view (:php:`$this->view->assign('products', $products)`) with :html:`{products}`. Tags starting with :html:`