b13 / form-custom-templates
Enable custom templates for emails sent using TYPO3\'s form framework email finishers
Installs: 6 659
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 8
Forks: 1
Open Issues: 3
Type:typo3-cms-extension
Requires
- php: ^8.1
- typo3/cms-core: ^11.5 || ^12.3
- typo3/cms-filelist: ^11.5 || ^12.3
- typo3/cms-form: ^11.5 || ^12.3
- typo3/cms-frontend: ^11.5 || ^12.3
- typo3/cms-install: ^11.5 || ^12.3
Requires (Dev)
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.2
- codeception/module-webdriver: ^1.1
- phpstan/phpstan: ^1.4.8
- typo3/coding-standards: ^0.4.0
- typo3/testing-framework: ^6.16.2
- dev-main
- v12.x-dev
- 2.0.0
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.9.2
- 0.9.1
- 0.9
- 0.8
- 0.7
- 0.6
- 0.5
- 0.4
- 0.3
- 0.2
- 0.1
- dev-labeldValues
- dev-bugfix/empty-page
- dev-bugfix/php-warning
- dev-task/hide-fields-disable-indexing
- dev-davidsteeb-patch-1
- dev-task/compatability-v12
- dev-bugfix/uri
- dev-bugfix/modify-tca-only-for-email
This package is auto-updated.
Last update: 2024-10-24 14:36:18 UTC
README
Allows a user to define the email template for each email finisher and override it in the plugin settings.
The global defined template is used by default. Additional templates need to be configured!
Install
composer req b13/form-custom-templates
Configuration
Doktype and typeNum
In case the doktype
(default: 125) or typeNum
(default: 101) are already used in the
current TYPO3 instance both values can be changed in Settings -> Extension Configuration.
The constants plugin.tx_form_custom_templates.doktype
and plugin.tx_form_custom_templates.typeNum
are set automatically depending on the set values in the Extension Configuration.
Add TypoScript configuration
Use @import
or include_static_file
to add the basic
configuration.
@import 'EXT:form_custom_templates/Configuration/TypoScript/setup.typoscript'
This will extend the EmailToSender
and EmailToReceiver
finisher with a template selector.
The template selector will list all pages of doktype Email (plugin.tx_form_custom_templates.doktype default: 125).
By default, the page doktype Email uses a template based on SystemEmail.html
Custom html templates:
[page["doktype"] == {$plugin.tx_form_custom_templates.doktype}]
# Set the template
page.10.templateName = SystemEmailTemplate
# Use custom template paths
page.10.templateRootPaths.20 = EXT:SITE_PACKAGE/Resources/Private/Frontend/Templates/
page.10.partialRootPaths.20 = EXT:SITE_PACKAGE/Resources/Private/Frontend/Partials/
page.10.layoutRootPaths.20 = EXT:SITE_PACKAGE/Resources/Private/Frontend/Layouts/
[END]
Custom result list template:
Define file path (omit suffix). A Template in html and txt format is required.
plugin.tx_form_custom_templates.resultList.templatePath = EXT:form_custom_templates/Resources/Private/Frontend/Partials/ResultTable
Define default template
module.tx_form.settings.yamlConfigurations.555 = EXT:YOUR_SITE_PACKAGE/Configuration/Yaml/CustomTemplate.yaml
plugin.tx_form.settings.yamlConfigurations.555 = EXT:YOUR_SITE_PACKAGE/Configuration/Yaml/CustomTemplate.yaml
TYPO3: CMS: Form: prototypes: standard: finishersDefinition: EmailToSender: formEditor: predefinedDefaults: options: emailTemplateUid: '221'