Gretyl's Portal

Heretto Help

Edit the Existing Heretto Portal Customizations

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

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 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 Portal instances are instantaneous.

  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.

Maintaining Multiple Configuration Files

Maintaining multiple config.json files in a single sitemap enables you to easily manage your development, 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 three configuration files:

<data href="config.json" name="config-base" type="config"/>
<data href="config-stg.json" name="config-stg" rev="stg" type="config"/>
<data href="config-prod.json" name="config-prod" rev="prod" type="config"/>

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

The config-prod.json and config-stg.json files specify additional configurations for your production and staging environments. Heretto Portal combines the config.json and the config-stg.json values together to create the staging portal and combines the config.json and the config-prod.json together to create the production portal.

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

In other words, the base configuration file, config.json, and the development, staging, or production file work in conjunction with one another to create the total configuration for an environment.

For example, the config.json and config-dev.json together make the up the full configuration for the development environment. 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 the following example we have a JSON array in the base config.json file:

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

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

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

The value from the config-stg.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 a flexible way to test multiple configurations and manage all of them in a single sitemap.