Skip to content

Commit 717b858

Browse files
committed
📝(documentation) Add custom export templates section
... with usage instructions and limitations Signed-off-by: rvveber <weber@b1-systems.de>
1 parent 2f010cf commit 717b858

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

docs/theming.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,39 @@ THEME_CUSTOMIZATION_FILE_PATH=<path>
8585

8686
### Example of JSON
8787

88-
The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/helm/env.d/dev/configuration/theme/demo.json
88+
The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/helm/env.d/dev/configuration/theme/demo.json
89+
90+
----
91+
92+
# **Custom Export Templates** 📄
93+
94+
You can define custom export templates to add introductory content, such as headers or titles, to documents before exporting them as PDF or DOCX.
95+
96+
Export Templates are managed through the admin interface and can be selected by users during the export process.
97+
98+
### Benefits
99+
100+
This feature offers several advantages:
101+
* **Header customization** 📄: Add custom headers, titles, or branding to exported documents.
102+
* **No code changes required** 🔧: Templates are managed through the admin interface without needing developer intervention.
103+
* **Flexible content** 🌟: Use HTML to create headers that match your organization's style.
104+
105+
### Limitations ⚠️
106+
107+
- Currently, templates are only prepended to the document.
108+
More complex layouts are not supported at this time.
109+
- The `CSS` and `Description` fields are being ignored at this time.
110+
- <b>Due to technical conversion limitations, not all HTML can be converted to the internal format, see step 4 below!</b>
111+
112+
### How to Use
113+
1. Make sure a superuser/admin account is available and you have access.
114+
2. Navigate to the admin interface at `/admin/core/template/add/` and create a new template.
115+
3. Fill in the `Title` field with a descriptive name for the template.
116+
4. In the `Code` field, enter the desired HTML content.
117+
<b>We highly recommend building the header manually in a Doc first, and use the `Copy as HTML` feature to get a compatible HTML structure for this.</b>
118+
119+
5. Check the `Public` checkbox to make the template available in the frontend export modal.
120+
6. Save the template.
121+
122+
Once created, users can select the template from the export modal in the frontend.
123+

0 commit comments

Comments
 (0)