:navigation-title: Fluid from the scratch .. include:: /Includes.rst.txt .. _fluid-templates-scratch: ================================ Fluid Templates from the Scratch ================================ .. contents:: .. _implement-templates-files: .. _the-page-layout-file: .. _create_template: Create the Fluid templates ========================== Copy the main :ref:`static HTML file ` from :file:`Resources/Public/StaticTemplate/default.html` to :file:`Resources/Private/PageView/Pages/Default.html`. You can override the file created in step :ref:`Minimal site package - The TYPO3 Fluid version `. The file name must begin with a capital letter The template name `Default.html` is used as a fall back if no other template names are defined. Do not change it for now. Even though this file ends on `.html` it will be interpreted by the templating engine Fluid. TYPO3 takes care of creating the outermost HTML structure of the site, including the `` and `` tags therefore they need to be removed from the template: .. literalinclude:: _codesnippets/_remove_head.diff :caption: Resources/Private/PageView/Pages/Default.html (difference) The Fluid template :file:`Default.html` now contains only the HTML code inside the body: .. literalinclude:: _codesnippets/_DefaultWithoutHead.html :caption: Resources/Private/PageView/Pages/Default.html Flush the caches and preview the page. You should now see a pure HTML page without any styles or images. We will add them in a further step. .. todo: Link to cache and preview pages in getting started once they exist .. todo: Add link to trouble shooting page once https://github.com/TYPO3-Documentation/TYPO3CMS-Tutorial-GettingStarted/issues/441 is done. .. note:: Each time you change a Fluid template you must flush the caches. Fluid templates preprocessed into PHP files and stored in the folder :path:`var/cache/code/fluid_template`. .. _typoscript-configuration-css-js-inclusion: .. _assets: Load assets (CSS, JavaScript) ----------------------------- Load all CSS which had been removed in step :ref:`create_template` using the :ref:`Asset.css ViewHelper `. Replace `