TypoScript Syntax

1.2.4. Includes

You can also add include-instructions in TypoScript code. Availability depends on the context, but it works with TypoScript templates, Page TSconfig and User TSconfig.

An include-instruction looks like this:

  <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/html/mainmenu_typoscript.txt">

 

  1. It must have its own line in the TypoScript template, otherwise it's not recognized.

  2. It is processed BEFORE any parsing of TypoScript (contrary to conditions) and therefore does not care about the nesting of confinements within the TypoScript code.

The "source" parameter points to the source of the included content. The string before the first ":" (in the example it is the word "FILE") will determine which source the content is coming from. This is the options:

FILE

A reference to a file relative to PATH_site. Must be less than 100 KB. Cannot contain ".." (double periods, back path).

If you prefix the relative path with such as "EXT:myext/directory/file.txt" then the file included will be sought for in the extension directory of extension "myext", subdirectory "directory/file.txt".

 

To top


Valid XHTML 1.0!