diff --git a/Classes/Controller/MailController.php b/Classes/Controller/MailController.php index bef75ffc700a4dc857bdfea9b6a5c68753aa001c..f5e1169a7f58bee8ad4e25d2a18606ee7424436b 100644 --- a/Classes/Controller/MailController.php +++ b/Classes/Controller/MailController.php @@ -381,7 +381,7 @@ class MailController extends ActionController { } // provide code example on how to register correctly - $code = '$GLOBALS[\'sgmail\'][\'' . $extensionName . '\'][\' ' + $code = '$GLOBALS[\'sgmail\'][\'' . $extensionName . '\'][\'' . \str_replace('.php', '', $configFile) . '\'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(\'' . $extensionName . '\') . \'/Configuration/SgMail/' . $configFile . '\';'; diff --git a/README.md b/README.md index d405cbed7517550d90f4f0570117550c64d280c1..89d2f985a2fdcced01ac46f7d87fa29bc282914f 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,12 @@ sg_mail ist multi-site and multi-language ready. ### Registering your Extension To register your extension with sg_mail, you need a **Configuration File** for each template you want to integrate. -It needs be a *.php* file and has to be inside the Configuration folder **typo3conf/ext/{your_extension}/Configuration** of your extension. -The naming of the file should be in upper camel case, matching your template name. +It needs be a *.php* file and has to be inside the Configuration folder **typo3conf/ext/{your_extension}/Configuration/Sgmail** of your extension. + +Additionally you need to make your registration file known in your **ext_local_conf.php** file: + + // register mail templates + $GLOBALS['sgmail']['my_extension_key']['unique_template_name'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('my_extension_key') . '/Configuration/SgMail/MyTemplate.php'; sg_mail will automatically parse valid configuration files of all extensions within your TYPO3 instance. @@ -159,11 +163,6 @@ This happens also if the given iso code of the language is not known (inside the In your template editor you have automatically all languages of your page shown. -## Using sg_mail with Formhandler - -In your **setup.txt** of your formhandler extension, you have to invoke the **FormhandlerFinisherService** of sg_mail. -This is done in a similar fashion as with the usual finisher classes. - ### Example finishers {