# Export Templates ## Purpose Open **Administration → Export Templates** (`/export-templates`) for the shared library of upper and lower document sections used in PDF/XLSX exports. Define reusable branding, institutional details, dates, lines and signatures for multiple modules. This library differs from [content export templates](/en/docs/content-export-templates), which define the exported document or table contents. Certificate and graduation document templates also have their own settings. ## Tabs and cards - **Headers** (`header`) — the upper part of an export. - **Footers** (`footer`) — the lower part. The tabs are independent and displayed only if the user can read the corresponding library. A card shows its name, status, last modification date (when supplied) and permitted actions. If no name is available, it displays the record ID. Use All / Active / Draft / Archived to filter cards. Filtering operates on the received list; there is no pagination control and the page requests up to 100 records of the selected kind. ## Creating and editing 1. Open the required tab. 2. Click Add. 3. In the [editor](/en/docs/export-template-editor), enter a localized name, add the contents and save. 4. Return to the library, inspect the status and check the layout. 5. Click Activate when the template is ready. For an existing card, the ellipsis menu contains Edit and Delete according to your permissions. Deletion requires confirmation. Archive a template instead of deleting it if it may be needed again. ## Status and use | Status | Meaning | Transitions in the list | | --- | --- | --- | | `draft` | Default for a newly created template; unavailable for export | Activate | | `active` | Available for export selection | Archive | | `archived` | Excluded from available exports | Activate or return to draft | Saving the layout and activating it are separate actions. Activation does not create a copy or a separately approved version: it updates the current template status. Editing an existing active partial changes what will be used in future exports. ### How a header or footer is selected - An explicit selection in the export form takes precedence. - For a content export with no explicit selection, the module's default header/footer (`export_header_partial_id` / `export_footer_partial_id`) may apply. Not set means no default. - For ordinary tabular exports, no default is applied automatically. Select a partial explicitly or export without one. - Explicitly choosing an inactive, deleted or incorrect-kind partial results in an unusable-partial error. If a previously assigned default is unavailable, the export proceeds without it. ### Example Create an institutional letterhead and a footer named Rector signature and date. Activate both, then select them in the export form, for example for a student list or a supported content document. Verify the result in each required format and language. For content exports where the letterhead should appear automatically, configure it as the relevant module's default. ## Permissions and scopes These libraries are global, not scoped to a faculty, department or profession. Header and footer privileges are independent. In [role permissions](/en/docs/role-permissions), the relevant modules are `export-header-templates` and `export-footer-templates`. | Action | Permission IDs for each kind | | --- | --- | | Read list, record, variable catalog and media | `*.index` | | Create, edit and change status | `*.store`, bound `*.update` | | Delete | `*.destroy` (server binds to `*.store`) | Here `*` means the appropriate kind. Permission to generate a particular export is configured separately in its own module. Editing the library does not grant access to personal records in an export. ## Troubleshooting Check the partial type, active status, list filter and library viewing permission. If a default disappears from the output after archiving, check the module setting and select an active replacement. If displayed institutional details are wrong, check [institution settings](/en/docs/educational-institution) and the template variables. ## Related guides - [Export partial editor](/en/docs/export-template-editor) - [Content export templates](/en/docs/content-export-templates) ## Implementation references - [Header and footer tabs](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ExportTemplates/container/index.tsx) - [Library filters and state changes](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ExportTemplates/components/ExportTemplateList.tsx) - [Permission groups](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Administration/ExportTemplates/ExportTemplatesService.ts) - [Library and permission bindings](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ExportTemplates/routes/api.php) - [Template lifecycle](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ExportTemplates/Services/ExportPartialService.php) - [Export selection precedence](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Services/Export/ExportPartialResolver.php) - [Default options](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/ExportTemplates/Services/ExportPartialOptionProvider.php)