Gretyl's Portal

Heretto Help

Edit the Existing Heretto Portal Customizations

You can edit the Heretto Portal configuration files directly in Heretto CCMS.

  1. In your Content Library, navigate to the following folder __configuration/portal_configuration.
  2. Right-click the config.json, custom.css file, or script.js file and select Edit Source.
  3. Make changes to the file.
  4. Click Save.
Verify the configuration changes by opening your Heretto Portal in a web browser.
Tip:

If you still cannot see your edits, try clearing your web browser cache.

If you use Mozilla Firefox, see How to clear the Firefox cache.

If you use Google Chrome™, see Clear cache & cookies.

Configuration Layers and Overrides

You can manage the configuration of multiple Heretto Portal environments from a single sitemap. This enables you to have different configurations for your preview, staging, and production portal environments.

Maintaining Multiple Configuration Files

Maintaining multiple config.json files in a single sitemap enables you to easily manage your preview, staging, and production portal configurations.

The config.json files are included in your sitemap as environment specific <data> elements. Here is an example of a sitemap with one base configuration file and three environment-specific configuration files:

<sitemap>
    <title>Thunderbird Sitemap</title>
    <sitemeta id="config">
        <data href="../config.json" name="config"/>
        <data href="../config-production.json" name="config-production" type="config" rev="production"/>
        <data href="../config-staging.json" name="config-staging" type="config" rev="staging"/>
        <data href="../config-preview.json" name="config-preview" type="config" rev="preview"/>
    </sitemeta>
    <sitesection/>
    	<mapref href="../../../_thunderbird_quick_start_guide.ditamap"/>
</sitemap>

The config.json specifies the base configuration and styling of your portal.

The config-production.json, config-staging.json, and config-preview.json files specify additional configurations for your production, staging, and preview environments.

Heretto Portal combines the base config.json file with the environment-specific configuration file to create a portal environment. For example, it combines the config.json and the config-preview.json values together to create the preview portal. In other words, the config.json and config-preview.json together make the up the full configuration for the preview environment.

Important: The @rev attribute value must be specified in the <data> element so the configuration files get correctly applied to the respective environments.

This configuration setup provides a nimble and powerful way to create environment-specific configurations to test and ultimately promote and deploy to production.

Layers and Overrides

Importantly, the configuration files may contain JSON objects and arrays. Objects in two or more configuration files are layered, or merged, into a single configuration object.

Arrays in two or more files, however, are overwritten when the files are combined into a full portal configuration, and the priority is given to the environment-specific configuration file. For example, in this example we have a JSON array in the base config.json file:

"search": {
        "facets": [
            "Content_Type"
        ]
    },

If the config-staging.json file also includes an array for search facets, such as:

"search": {
        "facets": [
            "Document_Category"
        ]
    },

The value from the config-staging.json will overwrite the value in the config.json and the staging portal environment will show the search facets corresponding to Document_Category.

Layering configuration files provides you with a flexible way to test multiple configurations and manage all of them in a single sitemap.