Nur bestimmte Inhalte als neue Elemente zulassen

# Beispiel: Nur NEws als neue Elemente zulassen:
mod.web_list {
   # Only pages and sys_category table elements will be linked to in the new record wizard
   allowedNewTables = tx_news_domain_model_news
}
page ts

Allow backend users to clear cache

options.clearCache.pages = 1 
options.clearCache.all = 1
options.clearCache.system = 1
Bezeichnungen im Backend umbenennen
user ts

"copy 1" bei kopierten Elementen deaktivieren

TCEMAIN.table.pages {
    disablePrependAtCopy = 1
    disableHideAtCopy = 1
}

TCEMAIN.table.tt_content {
    disablePrependAtCopy = 1
    disableHideAtCopy = 1
}
page ts

Navigationstitel statt Seitentitel anzeigen im Backend

options.pageTree.showNavTitle = 1
user ts

Add another header_layout option

TCEFORM.tt_content.header_layout {
   # Add another header_layout option:
   addItems.1525215969 = Another header layout
   # Add another one with localized label and icon
   addItems.1525216023 = LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:header_layout
   addItems.1525216023.icon = EXT:my_ext/icon.png
}

# Kann dann z.B. in der Datei \typo3\sysext\fluid_styled_content\Resources\Private\Partials\Header\Header.html angefragt werden
page ts

frame-space-before and frame-space-after

TCEFORM.tt_content {
 
    # remove Space Before?
    space_before_class.disabled = 0
 
    #remove Space After?
    space_after_class.disabled = 0
 
    # available: extra-small, small, medium, large, extra-large
    space_after_class {
        # removeItems = extra-small, small, medium, large, extra-large
        # altLabels.extra-small = sehr klein
    }
}
page ts

Rename/disable backend fields

# Beispiel News:
TCEFORM.tx_news_domain_model_news.title.label.default = deutscher Titel
TCEFORM.tx_news_domain_model_news.title.label.de = deutscher Titel
# Bild bei den News:
TCEFORM.tx_news_domain_model_news.fal_media.label = Bild zur Stelle

# Disable Fields in Backend:
TCEFORM.tx_news_domain_model_news.teaser.disabled = 1

# Sonstige:
TCEFORM.sys_file_reference.alternative.disabled = 1
TCEFORM.sys_file_reference.description.disabled = 1
TCEFORM.sys_file_reference.description.disabled = 1
TCEFORM.sys_file_reference.link.disabled = 1
TCEFORM.sys_file_reference.title.disabled = 1
TCAdefaults.sys_file_reference.showinpreview = 1
TCEFORM.sys_file_reference.showinpreview.disabled = 1
page ts

Abstände (Sace Before und Space After)

TCEFORM.tt_content {

    # available: extra-small, small, medium, large, extra-large

    # remove "Sace Before"-option:
    space_before_class.disabled = 1

    # remove all except extra-small:
    space_after_class {
        removeItems = small, medium, large, extra-large
        altLabels.extra-small = meine Bezeichnung
    }

}
page ts

Automatically clear cache

# clear cache for pages with ID:
TCEMAIN.clearCacheCmd = 2,21,22
page ts

TCAdefaults

# Number of Columns im Tab "Media" bei "Gallery Settings"
TCAdefaults.tt_content.imagecols = 1

# Syntax is always TCAdefaults.<tablename>.<fieldname> = value
TCAdefaults {
   tx_news_domain_model_news {
      author =  John Doe
      categories = 9
   }
}
  
    # Change the showinpreview default behaviour
    TCAdefaults {
       sys_file_reference {
          showinpreview = 1
       }
    }
page ts

Default values

# image sizes
styles.content.textmedia.maxW = 850
styles.content.textmedia.maxWInText = 850

# default header type
styles.content.defaultHeaderType = 2
constants

Seiten-ID im body-Tag

 # ab TYPO3 9.x
page { 
	bodyTag >
	bodyTagCObject = TEXT
	bodyTagCObject {
		data = page:uid
		case = lower
		dataWrap = <body id="page-|">
	}
}
setup
# TYPO3 8.7.20
page.bodyTag >
page.bodyTagCObject = TEXT
page.bodyTagCObject.field = uid
page.bodyTagCObject.wrap = <body id="page|">
setup

Layout als Klasse mit ausgegeben, wenn angegeben

# Das Layout wird als Klasse mit ausgegeben, wenn angegeben

page {
  bodyTagCObject = COA
  bodyTagCObject {
    # <body id="page-9"
    10 = TEXT
    10 {
      data = page:uid
      dataWrap = <body id="page-|"
    }

    #  class="layout-2"
    20 = TEXT
    20 {
      data = page:layout
	# nur ausgeben, wenn Layout > 0
      if.isTrue.data = page:layout   
      noTrimWrap = | class="layout-|"|
    }

    # >
    30 = TEXT
    30.value = >
  }
}
setup

Adding data to head

page.headerData {
	10 = TEXT
	10.value (
<!-- ich bin ein Kommentar im <head>! -->
)
}
setup

footerData

# SETUP
page.footerData {
   10 = TEXT
   10.value (
<!-- footerData start -->
 
<!-- footerData end -->
)
}
setup

includeJSFooter

page.includeJSFooter {
 
    jquery = fileadmin/templates/website-2/js/jquery-3.3.1.min.js
    jquery.disableCompression = 1
    jquery.forceOnTop = 1
 
    bootstrap = fileadmin/templates/website-2/js/bootstrap.min.js
    bootstrap.disableCompression = 1
 
}
setup

includeCSS

page.includeCSS {
        
    google-fonts = fonts.googleapis.com/css
    google-fonts.external = 1
    
    bootstrap = fileadmin/templates/website-2/css/bootstrap.min.css
    bootstrap.disableCompression = 1
 
    website-styles = fileadmin/templates/website-2/css/style.css
 
}
setup

Adding comments in head

page.config {
    headerComment (
This website was created by Andreas Löwer (info@andreasloewer.de)
)
}
setup

Extending html-tag

config.htmlTag_setParams = class="no-js"
# result: <html class="no-js">

  config.htmlTag.attributes.class = no-js
# result: <html class="no-js">

 config.htmlTag.attributes.amp =
# result: <html amp>
setup

Insert content elements by lib.*

lib.footer = COA
lib.footer {
	10 = RECORDS
	10.tables = tt_content
	10.source = 41
}
setup
<f:cObject typoscriptObjectPath="lib.footer" />

<f:comment>or inline:</f:comment>
{f:cObject(typoscriptObjectPath: "lib.footer")}
fluid templalte

Include a HTML-file

lib.dummyHomePageContent = COA
lib.dummyHomePageContent {
    10 = FLUIDTEMPLATE
    10.file = EXT:sitepackage_bacz_gartenmoebel/Resources/Private/Templates/ContentElements/dummyHomePageContent.html
}
setup

Replacing characters

lib.getNewsCategoryClean = TEXT
lib.getNewsCategoryClean {
    current = 1
    case = lower
    trim = 1
    replacement {
        10 {
            search.char = 32
            replace = -
        }
        20 {
            search = /(ä|Ä)/
            useRegExp = 1
            replace = ae
        }
        30 {
            search = /(ö|Ö)/
            useRegExp = 1
            replace = oe
        }
        40 {
            search = /(ü|Ü)/
            useRegExp = 1
            replace = ue
        }
        50 {
            search = ß
            replace = ss
            }
        60 {
            search = /\/\\\.\:\;\,\&/
            useRegExp = 1
            replace =
        }
        70 {
            search = /&/
            useRegExp = 1
            replace = und
        }
    }
}
setup

Beispiel News-Template

<f:if condition="{newsItem.categories}">
	<f:for each="{newsItem.categories}" as="category"> 
        Kategorie: <f:cObject typoscriptObjectPath="lib.getNewsCategoryClean" data="{category.title}" />
	</f:for>
</f:if>
fluid template

pageRenderer

# ToDo: prüfen. was das ist:
config.pageRendererTemplateFile = EXT:alf_sitepackage/Resources/Private/Templates/Page/PageRenderer.html
setup

Content Element Layouts

# add/change content element layouts
TCEFORM.tt_content {
 
	layout {
 
		addItems {
			4 = note-box
		}
 
        altLabels {
			0 = Normale Box
            1 = Blaue Box
            2 = Graue Box
            4 = Bitte beachten
        }
        removeItems = 5,6,7,8,9,10
	}
}
page ts

ce in Fluid Templates unterscheiden

<f:if condition="{data.layout}==3">
	<f:then>
		hier dann der Code
	</f:then>
</f:if>
fluid template

Page layouts

TCEFORM.pages {
    layout {
 
        addItems {
             4 = note-box
         }
 
        altLabels {
            0 = Default Group
            1 = Layout 1 Group
            2 = Layout 2 Group
            3 = Layout 3 Group
            4 = Ajax PopUp Page
        }
    }
}
page ts

File Links (Uploads)

# Neue Option in der Select-Box ("Display file/icon/thumbnail")
TCEFORM.tt_content {
 
    uploads_type {
        addItems {
            4 = note-box
        }
        altLabels {
            4 = Stellenanzeigen (PDFs)
        }
        removeItems = 5,6,7,8,9,10
    }
    
}
page ts