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 options | Required / Optional | Description |
---|---|---|
-p | Required | The directory where the the different themes are located. |
-cl | Optional | The 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. |
-d | Optional | The name of the default theme once the import is completed. (It has to be one of the themes to be imported.) |
-th | Optional | The 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.) |
-all | Optional | To import all themes in the given directory [True / False]. (This parameter is exclusive with the -th parameter.) |
-s | Optional | The extension of the subject template file. Default is _subject.html |
-b | Optional | The extension of the body template file. Default is _body.html |
-allow-update | Optional | By 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