Here, we intend to create a site package that outputs a single web page with the minimal effort. This site package can serve to test system output or as an example of the fewest required steps to create a working site package.
For this example, in the CMS backend, create a standard page named Minimal example just under (inside) the page tree TYPO3 logo container. On this standard page, create a new TypoScript template record. Give the new TypoScript template a title, and make it a root level template, but do not include any static templates.
The TypoScript-only version¶
In the TypoScript template Setup field, add the following three lines:
page = PAGE
page.1 = TEXT
page.1.value = Hello, world.
View the web page.
This TypoScript-only design has the least instructions required to output a web page from the CMS. This TypoScript template is self contained, there are no other files or database records needed. Changing this content requires the appropriate access needed to make changes to TypoScript templates.
The TYPO3 Fluid version¶
Empty the Minimal design page TypoScript template Setup field, then add the following lines in the field:
page = PAGE
page.1 = FLUIDTEMPLATE
page.1.file = EXT:site_package/Resources/Private/Templates/Minimal.html
Create a file named
Minimal.html in a
Now view the web page.
This approach puts the page content into a HTML file, allowing for separate access controls and it also allows for an editing workflow that does not need as much TypoScript. The CMS renderer still requires a TypoScript template on the Minimal design page to know what file to process for the page content.
Resulting web page¶
Here is the resulting web page HTML source for both the TypoScript-only and the Fluid based implementations. Notice how the CMS added default markup surrounding the single line of content:
This website is powered by TYPO3 - inspiring people to share!
TYPO3 is a free open source Content Management Framework initially
created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright 1998-2018 of Kasper Skaarhoj. Extensions are
copyright of their respective owners.
Information and contribution at https://typo3.org/
<meta name="generator" content="TYPO3 CMS">