blueways / bw-static-template
TYPO3 extension that adds a new content element for rendering static fluid templates. Inject JSON and FAL data into the templates.
Package info
github.com/maikschneider/bw_static_template
Type:typo3-cms-extension
pkg:composer/blueways/bw-static-template
Requires
- ext-json: *
- ext-pdo: *
- blueways/bw-jsoneditor: ^2.0
- typo3/cms-core: ^13.4 || ^14.2
Requires (Dev)
- armin/editorconfig-cli: ^2.0
- codeception/codeception: ^5.1
- codeception/module-asserts: ^3.0
- codeception/module-db: ^3.2
- codeception/module-phpbrowser: ^3.0
- ergebnis/composer-normalize: ^2.44
- friendsofphp/php-cs-fixer: ^3.12
- helhum/typo3-console: ^8.1
- helmich/typo3-typoscript-lint: ^3.2
- move-elevator/composer-translation-validator: ^1.3
- saschaegerer/phpstan-typo3: ^2.1 || ^3.0
- ssch/typo3-rector: ^2.10 || ^3.13
- typo3/cms-base-distribution: ^13.4 || ^14.0
- typo3/cms-lowlevel: ^13.4 || ^14.2
- dev-main
- v13.x-dev
- 5.0.0
- 4.1.0
- 4.0.0
- v3.0.0
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.2
- v2.0.0
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- 1.0.2
- 1.0.1
- dev-renovate/nick-fields-retry-4.x
- dev-renovate/codeception-module-phpbrowser-4.x
- dev-renovate/major-github-artifact-actions
- dev-cleanup
- dev-site-sets
- dev-copilot/site-sets
- dev-element-registration
- dev-package-exclude
- dev-v13-fix
- dev-header-field
- dev-renovate/actions-checkout-6.x
- dev-invalid-json-test
- dev-add-support-typo3-14
- dev-renovate/major-typo3
- dev-renovate/major-phpstan-packages
- dev-renovate/friendsoftypo3-content-blocks-2.x
- dev-codeception
- dev-renovate/major-symfony
- dev-dev-dependencies
- dev-renovate/bk2k-bootstrap-package-16.x
- dev-renovate/ssch-typo3-rector-3.x
- dev-development
- dev-master
- dev-feature/v3
This package is auto-updated.
Last update: 2026-04-02 02:54:48 UTC
README
TYPO3 extension bw_static_template
This TYPO3 extension ships a custom content element that renders every Fluid template. Inject JSON data or FAL files into the templates. Perfect for fast template development.
Why?
- Sometimes content is very unlikely to change regularly. It's faster to immediately write a Fluid template than to create a custom content element or adjust an extension to your needs.
- No need to write TCA or TypoScript to get frontend output that can be adjusted through the backend. (E.g. quick image or phone number change)
- If a standalone solution is required, the templates can be reused.
Install
- Install via composer:
composer require blueways/bw-static-template
- Add the site set
blueways/bw-static-templateto your site configuration:
# config/sites/<your-site>/config.yaml sets: - blueways/bw-static-template
Usage
Add the content element Static Template to a page.
Select a template
Enter a Fluid template path in the Frontend template field:
- A template name (e.g.
MyTemplate) — resolved against the configuredtemplateRootPaths - A full EXT: path (e.g.
EXT:your_ext/Resources/Private/Templates/MyTemplate.html)
Save & done.
Optional: Pass data into the template
Enter valid JSON in the JSON field:
{
"templateMarker1": "Example marker data",
"persons": [
{
"name": "Markus Mustermann",
"contactUid": 3
},
{
"name": "Paul Werner",
"contactUid": 4
}
]
}
Now you can use the given data in your template, e.g.:
Hello {templateMarker1}!
<f:for each="{persons}" as="person">
Say hello to <f:link.page pageUid="{person.contactUid}">{person.name}</f:link.page>
</f:for>
Optional: Load JSON from file
Toggle Use database off to load JSON from a file path instead of the inline editor. Enter a relative or EXT: path in the JSON file path field. Remote URLs are also supported.
Optional: Select images
The selected images are accessible as FileReference objects via the {files} variable:
<f:for each="{files}" as="file"> <f:image image="{file}" /> </f:for>
Optional: Backend preview template
Enter a template name or EXT: path in the Backend preview field to render a custom Fluid template in the backend page module instead of the default JSON table view. The same JSON data and file variables are available as in the frontend template.
Configuration
Constants
Configure the template root paths so that template names are resolved correctly:
plugin.tx_bwstatictemplate {
view {
templateRootPath =
partialRootPath =
layoutRootPath =
}
}
TypoScript
The content element is rendered like any other lib.contentElement-based element. Use standard TypoScript to inject additional data:
tt_content.bw_static_template {
# insert variables
variables {
foo = TEXT
foo.value = bar
}
# use DataProcessor (indexes 10 and 20 are reserved)
dataProcessing {
# Inject a menu
30 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
30 {
as = navigation
entryLevel = 0
}
# Inject data about the current page
40 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
40 {
table = pages
pidInList = this
as = page
}
}
}
License
This project is licensed under GNU General Public License 2.0 (or later).
Contribute
This extension was made by Maik Schneider. Feel free to contribute!


