The template import utility allows you to add your own custom templates to the database that the Web SDK uses to present templates to the user. Keep in mind that although this may be convenient, we do recommend that you implement your own REST service to manage templates within your application. For more information, please refer to the Template Service topic in the Web SDK documentation.
Always stop the “WebSDK Server V7.x” from the “Services” control panel snap-in that can be accessed from Control Panel > Administrative Tools > Services.
After importing your custom templates you will need to configure the server to use them. Set the
enableCustomTemplates
property to true. See the following page
for more information.
Be sure to start the service again once you have successfully run this script.
The main script that you will utilize is the following:
C:\Path\to\SDK\server\template-import.cmd
--help
A quick synopsis of the information covered in this document.
--dir-in
(required) – This is a path to a folder containing the custom templates you wish to add to the
template database. Multiple directories can be imported by separating the paths with spaces.
See examples below. This folder(s) will need to contain one or more subfolders containing template files.
The name of each of these subfolders will be the Group name that will appear in the “Template Group”
dropdown in the Template Manager in the ESD Web control.
Should look like this in the template manager.
--locale
(optional, default = en) - This option determines what type of tokenizer is used
in the database. Values are "en-US" for English (US), "it-IT (Italy)" for Italian, "ar-EG" for Arabic (Egypt),
"zh-TW" for Chinese (Taiwan).
--watch
– This option will continually watch the directories provided by --dir-in
.
If you choose to explore this option we recommend configuring the powershell script to run as a windows
service.
.\template-import.cmd --dir-in "C:\temp\templates"
.\template-import.cmd --dir-in C:\Temp\Templates C:\Temp\Templates2
.\template-import.cmd --dir-in "C:\temp\templates" --watch
.\template-import.cmd --dir-in "C:\temp\templates" --locale “ar”