Skip to content

import-notification-themes

Imports the content of a notification theme in a zip file. The base directory in the zip file corresponds to the notification theme id. This id is used when the theme is imported after being modified.

Syntax:

shell
sfiler-cli [options] import-notification-themes [command options]
Command optionsRequired / OptionalDescription
-pRequiredThe directory where the the different themes are located.
-clOptionalThe name of the theme that will be cloned upon import. This theme has to be already part of the Database. If no theme is specified, the default theme is used.
-dOptionalThe name of the default theme once the import is completed. (It has to be one of the themes to be imported.)
-thOptionalThe name of the theme folder(s) to be imported. If there are more than one, separate them by a comma. (This parameter is exclusive with the -all parameter.)
-allOptionalTo import all themes in the given directory [True / False]. (This parameter is exclusive with the -th parameter.)
-sOptionalThe extension of the subject template file. Default is _subject.html
-bOptionalThe extension of the body template file. Default is _body.html
-allow-updateOptionalBy default, this command returns an error if a theme to be imported already exists in the database. If this flag is set, it allows to update the existing theme instead of returning an error.

Example:

This command imports all notification themes in the etc/mail/notification directory into the database.

shell
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" import-notification-themes -p "etc/mail/notification" -all

This command can be combined with the export-notification-theme command. When exported, you'll get a ZIP file containing the notification theme you specified. You can then make the necessary changes and import them back into the database using this command, taking care to specify the theme identifier to be updated and the --allow-update parameter.

shell
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" import-notification-themes -p /working-folder -th 1 -allow-update