The root query retrieves the entities from censhare that can be accessed in the CI HUB panel. You can use a custom query to replace the default.

Introduction

To replace the root query, you can create a resource replace variant of the default transformation, and reference the resource replace variant in the folder schema of the CI HUB module.

Key steps

Proceed as follows:

  1. In censhare Web, search for the Cihub (top-level) transformation (resource key: censhare:search.cihub.groups.top-level).
  2. Create a resource replace variant of the asset.
  3. Edit the query definition in the XSL transformation master file. 

    Make sure that your custom query shows only group assets. Other asset types than groups are ignored.

  4. Save your changes.
  5. Open a terminal and download the folder schema from the CI HUB module:

    scp -r root@CENSHARE_SERVER: /opt/corpus/censhare/censhare-Custom/censhare-Server/app/modules/cihub/schemas/100-folder-schema.json
  6. Open the JSON file in an editor and search for the root query key reference:

    ...
    "cs:queries": {
            "roots": "$savedSearch(\"censhare:search.cihub.groups.top-level\")"
        },
    ...


  7. Replace the resource key with the resource key of the resource replace variant: 

    ...
    "cs:queries": {
            "roots": "$savedSearch(\"[RESOURCE_REPLACE_VARIANT_KEY]\")"
        },
    ...


  8. Save your changes.
  9. Upload the folder schema back to the censhare Server: 

    scp 100-folder-schema.json root@CENSHARE_SERVER: /opt/corpus/censhare/censhare-Custom/censhare-Server/app/modules/cihub/schemas


  10. Open the censhare Admin Client and Update the server configuration. If necessary, also Synchronize remote servers.

For more information about updating and testing schemas, see Get started with customization.

Result

The navigation structure in the CI HUB panel shows the customized folder structure.