Show Menu

TYPO3: New Website Cheat Sheet by

Basic TypoScript etc. for creating a new TYPO3 Website.

Constants: Basic Constants

To globally change your domain (to go live for example)
Globally change your protocol. e.g. from http:// to https://
change the basic path to your fileadmin directory (file­adm­in/­old­_files to filea­dmi­n/n­ew_­files)

TypoSc­ript: Basic Config­uration

config {

doctype = html5
xmlpro­logue = none

baseURL = {$prot­oco­l}:­//{­$do­main}

language = de
locale_all = german
htmlTa­g_l­angKey = de
sys_la­ngu­age_uid = 0

# Add L Parameter to links
linkVars := addToL­ist(L)
unique­Lin­kVars = 1

# Enable ReaURL
tx_rea­lur­l_e­nable = 1

# Decide for yourself
moveJs­Fro­mHe­ade­rTo­Footer = 0

# AdminPanel on
admPanel = 1

# Pagetitle off
noPage­Title = 2

# Spam-P­rot­ection - choose your favorite method
spamPr­ote­ctE­mai­lAd­dresses = ascii

Typosc­ript: Change Website Title

page.h­ead­erData {
10 = TEXT
10 {
field = title
noTrimWrap = |<t­itl­e>| - Websit­e</­tit­le>|
}­Pag­eTitle = 2
is mandatory

TypoSc­ript: Fav Icon

page.s­hor­tcu­tIcon = {$file­adm­in}­/fa­vic­on.ico

TypoSc­ript: Language Condition

[globalVar = GP:L = 1]­s_l­ang­uag­e_uid = 1­nguage = en
config.lo­cal­e_all = english­mlT­ag_­langKey = en

TypoSc­ript: Add Meta-Tag "­vie­wpo­rt"

page.m­­ewport = width=­dev­ice­-width, initia­l-s­cale=1, maximu­m-s­cale=1, user-s­cal­able=no

TypoSc­ript: Canoci­al-Tag

page.h­ead­erD­ata.930 = TEXT
page.h­ead­erD­ata.930 {
typolink {
parameter = {page:uid}
parame­­ser­tData = 1
useCac­heHash = 1
addQue­ryS­tring = 1
addQue­ryS­tri­ng.m­ethod = GET
addQue­ryS­tri­ng.e­xclude = id,no_­cac­he,­tt_­new­s[b­ackPid]
returnLast = url
wrap = <link rel="ca­non­ica­l" href="{­$pr­oto­col­}:/­/{$­dom­ain­}|" />

TypoSc­ript: Backend Layout

page.10 {

# Use the constants in your tpls
variables {
domain = TEXT
domain.value = {$domain}
protocol = TEXT
protoc­ol.v­alue = {$prot­ocol}
fileadmin = TEXT
filead­min.value = {$file­admin}
# e.g. for anchor urls
typo3_­req­ues­t_url = TEXT
typo3_­req­ues­t_u­ = getInd­pEnv: TYPO3_­REQ­UES­T_URL


file.s­tdW­rap.cO­bject = CASE
file.s­tdW­rap.cO­bject { = levelf­iel­d:-1, backen­d_l­ayo­ut_­nex­t_l­evel, slide
key.ov­err­ide.field = backen­d_l­ayout

# default template file
default = TEXT
defaul­t.value = {$file­adm­in}­/tp­l/d­efa­ult.html
2 = TEXT
2.value = {$file­adm­in}­/tp­l/a­lt_­one.html
3 = TEXT
3.value = {$file­adm­in}­/tp­l/a­lt_­two.html

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


Please feel free to tell me what your would like to see in this cheat sheet. I am going to extend it from time to time with new or better typoscript solutions.


Can we add css/js include via typoscript ? (includeCSS,includeJS )
Also add other meta tags like, author, keywords,description, robots,X-UA-Compatible ..etc
bodyTagAdd ??


You cheat sheet has been linked on the official TYPO3 page

We would like to restrict the list to only the cheat sheets that are up to date for the respective version (you can switch to the other versions by clicking "Related links in menu bottom left").

It would be great if you could create a seperate cheat sheet for each major version (7.6, 8.7, 9.5, 10...) or alternatively a "one fits all" which marks things as outdated that are no longer in current LTS (9.5).

Please feel free to contact us on Slack in #typo3-documentation, see

Sybille Peters (TYPO3 Documentation Team)

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Wikipedia Cheat Sheet
          Cheatography Cheat Sheet
          Reddit Cheat Sheet