TypoScript setup
In step Minimal site package - The TYPO3 Fluid
version we placed all TypoScript into
the site set, file
packages/
.
In the following chapters we will need additional TypoScript setup configurations.
Theoretically you could put all TypoScript into one big file and it would work fine. But you have better overview if you split it up in multiple files ordered by purpose.
Familiarize yourself with the TypoScript @import
syntax first:
TYPO3 Explained, @import syntax.
Import the TypoScript from a different location
Create a new folder called Configuration/
. In this
create a file called pageview.
and copy the content from
file Configuration/
into it.
Then change the latter file to contain the following:
@import 'EXT:site_package/Configuration/TypoScript/Setup/pageview.typoscript'
Flush the caches and preview the page. The output should be unchanged.
Import all TypoScript files from a folder using a wildcard
We will create more TypoScript files in the next steps. We could import them file by file. But as the order will not matter we can import all of them via wildcard:
@import 'EXT:site_package/Configuration/TypoScript/Setup/*.typoscript'
@import 'EXT:site_package/Configuration/TypoScript/Setup/Navigation/*.typoscript'
Only files from the folder directly will be imported. If you create subfolders later on you have to import them separately.
Structure of the Configuration
directory
Your Configuration
directory should now have the following structure:
-
-
-
-
config.yaml
-
setup.typoscript
-
-
-
-
-
pageview.typoscript
-
-
-
In the next steps you will create more TypoScript files to configure the Content mapping and the menus.