15
edits
(Add: meaning of variables __OTHER1__ to __OTHER5__ for each recipients list (tested on 24.0.1)) |
(Add section: emailing layouts (v20+), adding a custom layout) |
||
| Line 80: | Line 80: | ||
Checked in Dolibarr v14 to v24. | Checked in Dolibarr v14 to v24. | ||
==Layout: email templates== | |||
Since Dolibarr v20, when you create an emailing, the link "Fill message with a layout" (icon above the message) offers ready-made layouts. Choosing a layout replaces the message with the layout content, which you can then edit freely. There is no screen to create or edit layouts. | |||
* '''v20''': fixed list (Empty, Basic, News, Commerce), defined in the code. | |||
* '''From v21''': each layout is an HTML file in the directory ''htdocs/install/doctemplates/maillayout/''. The list shows "Empty" ("None" from v23) and then one layout per file. From v22, News is only shown if the Websites module is enabled, and Products (Product from v23) only if the Products or Services module is enabled. | |||
'''Adding your own layout''' (v21 and later): | |||
# Copy ''basic.html'' under another name in the same directory, for example ''association.html'', and edit the copy. The layout appears in the list under the file name ("Association"). | |||
# For the thumbnail, add an image with the same name (''association.png'') in ''htdocs/theme/common/maillayout/''. | |||
Emailing variables (__LASTNAME__, __OTHER1__…) can be written in the file: they stay as they are in the message and are replaced when sending. Do not edit ''basic.html'' itself (it is replaced at each upgrade), and keep a copy of your files: they are in the application directory, not in the documents directory. | |||
'''Without touching files''': prepare an emailing with the layout you want, then for each new sending, open it and click "Clone" with "Clone message" checked. | |||
Tested in v20, v21, v22 and v24 (same code in v23). | |||
edits