Skip to content

Commit

Permalink
[Backport 12.4] Missing Example for Template (#5209)
Browse files Browse the repository at this point in the history
* Missing Example for Template

* Move anchor above its headline

* Use directory tree and insert a headline for the example

---------

Co-authored-by: in-session <info@in-session.de>
Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent d8920d7 commit 16db481
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion Documentation/ApiOverview/Mail/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,47 @@ If you want to provide custom templates or layouts, set this in your
:caption: config/system/additional.php | typo3conf/system/additional.php
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][700]
= 'EXT:my_site_extension/Resources/Private/Templates/Email';
= 'EXT:my_site_package/Resources/Private/Templates/Email';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths'][700]
= 'EXT:my_site_extension/Resources/Private/Layouts';
.. _mail-configuration-fluid-example:

Minimal example for a Fluid-based email template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**Directory Structure:**

.. directory-tree::
:show-file-icons: true

* EXT:my_site_package/

* Resources

* Private

* Templates

* Email

* MyCustomEmail.html

**`MyCustomEmail.html`:**

.. code-block:: html
:caption: EXT:my_site_package/Resources/Private/Templates/Email/MyCustomEmail.html

<f:layout name="SystemEmail" />

<f:section name="Subject">
My Custom Subject
</f:section>

<f:section name="Main">
Hello, this is a custom email template!
</f:section>

.. _mail-configuration-transport:

transport
Expand Down

0 comments on commit 16db481

Please sign in to comment.