PAGE Examples
A simple "Hello World" Example
Demonstrates:
EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript
A page using a Fluid template
Demonstrates:
EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript
page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
templateName = Default
layoutRootPaths {
10 = EXT:my_sitepackage/Resources/Private/Layouts
}
partialRootPaths {
10 = EXT:my_sitepackage/Resources/Private/Partials
}
templateRootPaths {
10 = EXT:my_sitepackage/Resources/Private/Templates
}
variables {
foo = TEXT
foo.value = bar
}
}
A page type used for ajax requests
Demonstrates:
While many examples found in the internet promote to set
config. it is better to only disable the cache for objects
where it absolutely needs to be disabled, leaving all other caches untouched.
This can be achieved for example by using a non-cacheable array, the
COA_INT.
EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript
A page type used for JSON data
Demonstrates:
To create a page type in the format json an additional
header with Content- has to be set:
EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript
json = PAGE
json {
typeNum = 1617455215
10 =< tt_content.list.20.tx_myextension_myjsonplugin
config {
disableAllHeaderCode = 1
additionalHeaders.10.header = Content-type:application/json
admPanel = 0
}
}
The built-in
Json can be used to
create the content via Extbase.