Skip to content

Exporting your theme from your system

Exporting the theme metadata.

  1. Use the directory where you want to export as your base directory when running the commands.
  2. Export your install theme xml file by running the following command.

    # assumes other required parameters are already set via config file in store or via enviroment variables
    dxclient xmlaccess \
       -dxUsername {DXUSERNAME} \
       -dxPassword {DXPASSWORD} \
       -xmlFile {XMLEXPORT} \
       -dxProtocol $DXPROTOCOL \
       -hostname $HOSTNAME \
       -dxPort $DXPORT;
    
    :: assumes other required parameters are already set via config file in store or via enviroment variables
    dxclient xmlaccess ^
       -dxUsername {DXUSERNAME} ^
       -dxPassword {DXPASSWORD} ^
       -xmlFile {XMLEXPORT} ^
       -dxProtocol %DXPROTOCOL% ^
       -hostname %HOSTNAME% ^
       -dxPort %DXPORT%;
    

Notes on parameters:

  1. xmlFile should be pointing to your theme metadata export xml during setup.
  2. Ensure to place your correct credentials in the {DXUSERNAME} and {DXPASSWORD}.

Output

Find in your base directory the xml output in store/outputFiles/xmlaccess (The xml output file should look something like this: Output-20220926153722.xml). Move the exported xmlfile to a different directory to ensure it would not be lost.

See more detailed information here.

Exporting Theme source code

  1. Use the same directory as before.
  2. Find a undeploy request xml for your theme and then edit the uniquename to match yours or create yours like the following. Sample XML files can be found in the samples directory of DXClient or in DX server located in the following directory: PortalServer_root/doc/xml-samples. For example, theme-export.xml.

     ```XML
     <?xml version="1.0" encoding="UTF-8"?>
     <request type="update" version="8.0.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd">
     <portal action="locate">
     <skin action="delete" uniquename="custom.portal.skin.Woodburn%20Insurance.Standard"/>
     <theme action="delete" uniquename="custom.portal.theme.Woodburn%20Insurance"/>
     </portal>
     </request>
     ```
    
    • Modify the uniquename to match yours.

      <portal action="locate">
      <skin action="delete" uniquename="custom.portal.skin.Woodburn%20Insurance.Standard"/>
      <theme action="delete" uniquename="custom.portal.theme.Woodburn%20Insurance"/>
      </portal>
      
    • You can find it by going to Theme Manager and then clicking the cog. Theme Manager

    • For skin uniquename. Skin Object ID
    • For theme uniquename. Theme Object ID
  3. Undeploy your theme by running the following command.

    source ./{configfile}
    dxclient undeploy-theme \
       -dxProtocol {DXPROTOCOL} \
       -hostname {HOSTNAME} \
       -dxPort {DXPORT} \
       -dxUsername {DXUSERNAME} \
       -dxPassword {DXPASSWORD} \
       -hostname {HOSTNAME} \
       -dxConnectPort {DXCONNECTPORT} \
       -dxConnectUsername {DXUSERNAME} \
       -dxConnectPassword {DXPASSWORD} \
       -xmlFile {XMLEXPORT} \
       -themeName {THEMENAME} \
       -enableBackup true \
       -dxProfileName {DXPROFILENAME}
    
    {configFile}
    dxclient undeploy-theme ^
       -dxUsername {DXUSERNAME} ^
       -dxPassword {DXPASSWORD} ^
       -dxConnectUsername {DXUSERNAME} ^
       -dxConnectPassword {DXPASSWORD} ^
       -xmlFile {XMLEXPORT} ^
       -themeName {THEMENAME} ^
       -dxProtocol {DXPROTOCOL} ^
       -hostname {HOSTNAME} ^
       -dxPort {DXPORT} ^
       -hostname {HOSTNAME} ^
       -dxConnectPort {DXCONNECTPORT} ^
       -enableBackup true ^
       -dxProfileName {DXPROFILENAME}
    

Notes on parameters:

  1. xmlFile should be pointing to your xml in the step 2 above.
  2. if you are using Woodburn Insurance Demo it should be "Woodburn Insurance/components/Woodburn Insurance/content/xmlaccess/uninstall/uninstallTheme.xml".
  3. themeName should be "{Theme Name}"
  4. if you are using Woodburn Insurance Demo it should be "Woodburn Insurance".

Output

Find in your base directory the exported theme zipped in store/outputFiles/themes/backup/webdav (The zip output file should look something like this: Woodburn Insurance-20220926104910.zip). Move the exported zip file to a different directory to ensure it would not be lost.

See more detailed information here.

Redeploying Theme

  1. Use the same directory as before.
  2. Deploy your theme by running the following command.

    source ./{configfile}
    dxclient deploy-theme \
       -xmlFile {INSTALLTHEME} \
       -themeName "{THEMENAME}" \
       -themePath {PATH/TO/YOUR/THEME/ZIP} \
       -dxUsername {DXUSERNAME} \
       -dxPassword {DXPASSWORD} \
       -dxConnectUsername {DXUSERNAME} \
       -dxConnectPassword {DXPASSWORD} \
       -hostname $HOSTNAME \
       -dxProtocol $DXPROTOCOL \
       -dxPort $DXPORT \
       -hostname $HOSTNAME \
       -dxProfileName $DXPROFILENAME
    
    {configFile}
    dxclient deploy-theme ^
       -xmlFile {INSTALLTHEME} ^
       -themeName "{THEMENAME}" ^
       -themePath {PATH/TO/YOUR/THEME/ZIP} ^
       -dxUsername {DXUSERNAME} ^
       -dxPassword {DXPASSWORD} ^
       -dxConnectUsername {DXUSERNAME} ^
       -dxConnectPassword {DXPASSWORD} ^
       -hostname %HOSTNAME% ^
       -dxProtocol %DXPROTOCOL% ^
       -dxPort %DXPORT% ^
       -hostname %HOSTNAME% ^
       -dxProfileName %DXPROFILENAME%
    

    Notes on parameters:

    1. xmlFile should be pointing to the xml exported in this step.
    2. themeName should be what is the theme name.
      • "Woodburn Insurance" if you are on Woodburn Insurance Demo
    3. themePath should be pointing to the zip exported in this step.
    4. Ensure to place your correct credentials in the {DXUSERNAME} and {DXPASSWORD}.
  3. The output should look similar to this.

       2022-09-22 14:39:10 : Start to deploy theme in WebDav.
       (node:1) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
       (Use `node --trace-warnings ...` to show where the warning was created)
       2022-09-22 14:39:10 : The theme Woodburn Insurance is available under WebDAV themes collection.
       2022-09-22 14:39:12 : WebDAV theme back up has been taken and placed in : store/outputFiles/themes/backup/webdav/Woodburn Insurance-20220922143911.zip.
       2022-09-22 14:39:15 : Files uploaded successfully to Woodburn Insurance under WebDAV themes collection.
       2022-09-22 14:39:19 : Export of the theme has been completed, Please refer this file for more details - store/outputFiles/themes/backup/xmlfile/Output-20220922143919.xml.
       2022-09-22 14:39:19 : Theme registration has been completed, Please refer this file for more details - store/outputFiles/themes/Output-20220922143919.xml.
       2022-09-22 14:39:19 : Deploy theme execution successful.
       2022-09-22 14:39:19 : 
       Theme WebDAV deployment successful.
       Theme Registration successful.
    
  4. Verify your theme by going to the Theme Manager and your theme should still be here. Verify Themes

See more detailed information here.

Related information