Customize the Content Portal Behavior

To extend the default Heretto Deploy Portal behavior or add custom features, you can implement your own JavaScript code.

Prepare your sitemap for portal customizations. See Prepare a Sitemap for Content Portal Customizations.
Note: Your content library may contain multiple sitemaps associated with different portal instances such as production (public) or staging (internal) instances. We recommend keeping the sitemaps associated with production (public) Heretto Deploy Portal instances on distinct branches different than the default “master” branch.

Any configuration, style, behavior, or content changes that you make to the sitemaps associated with your Heretto Deploy Portal instances are instantaneous.

Prepare the configuration file.
  1. Upload the config.json, scripts.js, or CSS file into the __configuration/portal_configuration folder in the content library.
    Important: Do not upload empty files into Heretto CCMS.
  2. To open the file, right-click on scripts.js file and click the Edit Source button to open the file in the Source Editor.
Add the configuration file to your sitemap.
  1. In the content library double-click on the sitemap that you want to modify to open it in the Content Editor.
  2. Drag and drop the script.js file onto the <sitemeta> element.
    The script.js file is added as a <data> element.
    sitemeta element
  3. In the left pane, hover over script.js and click the gear icon.
  4. In the pane that appears, in the name field, enter scripts.
  5. If needed, clear the scope field by clicking the corresponding trash icon.

Verify the configuration changes by opening your portal in a web browser.