External Links¶

While external links can be included in the Markdown-formatted descriptions of many entities in SampleDB, there may be some links you might want to include in a more prominent way, e.g. to direct users to internal dashboards or other services. The SAMPLEDB_EXTERNAL_LINKS environment variable can be used to configure such links.

The links specified will be shown as one or more dropdown buttons with a label, an icon and a list of links, each with an URL and a name:

External links for an action

External links for an action¶

This configuration variable must be a JSON-encoded list containing one or more dicts containing the following fields:

  • label the label for the dropdown button, as a string or a dict mapping language codes to translated labels (default: {"en": "Links"})

  • icon the FontAwesome v4 icon class (default: fa-external-link)

  • links a list containing dicts with url set to the URL and name set to the name of the link, either as string or as dict mapping language codes to translated names

  • applies_to a dict mapping the following keys to lists containing integer IDs or the string "*" as a wildcard for all IDs: objects_by_action_id, actions_by_action_id, instruments_by_instrument_id, topics_by_topic_id, basic_groups_by_basic_group_id, project_groups_by_project_group_id. Each of these keys controls where the links should be shown, e.g. the ID list for objects_by_action_id set the links to be shown for objects with the given action IDs.

  • applies_to_placeholder the placeholder used for inserting the kind of entity the link is applied to in URLs, e.g. object for objects_by_action_id or topic for topics_by_topic_id, (default: <A>)

  • id_placeholder the placeholder used for inserting the current ID in URLs (default: <ID>)

As an example, the following would be a valid value for SAMPLEDB_EXTERNAL_LINKS:

A configuration for adding a link to the current object page to objects of every action¶
[
  {
    "label": "Links",
    "icon": "fa-external-link",
    "id_placeholder": "<ID>",
    "links": [
      {
        "url": "https://example.org/objects/<ID>",
        "name": "Object Page"
      }
    ],
    "applies_to": {
      "objects_by_action_id": ["*"]
    }
  }
]

Logo

SampleDB

Sample and Measurement Metadata Database

0.33.1 (latest)

Navigation

User Guide

  • Users
  • Basic Groups
  • Project Groups
  • Group Categories
  • Instruments
  • Actions
  • Metadata and Schemas
  • Objects
  • Search
  • Locations
  • Topics
  • Export and Import
  • Citation Guide

Tutorials

  • Understanding Core Concepts
  • Entering Data
  • Managing Object Permissions
  • Finding Objects
  • Sharing Data with Other Databases
  • Using the HTTP API

Administrator Guide

  • Getting Started
  • Configuration
  • TLS Termination
  • OpenID Connect (OIDC)
  • Backup and Restore
  • Upgrading
  • Administration Scripts
  • JupyterHub Support
  • Dataverse Export
  • SciCat Export
  • Info Pages
  • Languages
  • Federation
  • Monitoring Dashboard
  • Download Service
  • Customization
  • Deprecated Features
  • Label Paper Formats
  • External Links

Developer Guide

  • HTTP API
  • Webhooks
  • Contributing
  • Changelog

  • Source Code
  • Issues
  • Contact
  • Legal Notice
  • PGI/JCNS-TA

Related Topics

  • Documentation overview
    • Previous: Label Paper Formats
    • Next: HTTP API

Versions

  • develop
  • latest
  • 0.33.1
  • 0.33.0
  • 0.32.0
  • 0.31.1
  • 0.31.0
  • 0.30.0
  • 0.29.1
  • 0.29.0
  • 0.28.2
  • 0.28.1
  • 0.28.0
  • 0.27.0
  • 0.26.0
  • 0.25.3
  • 0.25.2
  • 0.25.1
  • 0.25.0
  • 0.24.1
  • 0.24.0
  • 0.23.1
  • 0.23.0
  • 0.22.1
  • 0.22.0
  • 0.21.5
  • 0.21.4
  • 0.21.3
  • 0.21.2
  • 0.21.1
  • 0.21.0
  • 0.20.0
  • 0.19.3
  • 0.19.2
  • 0.19.1
  • 0.19.0
  • 0.18.0
  • 0.17.0
  • 0.16.1
  • 0.16.0
  • 0.15.0
  • 0.14.1
  • 0.14.0
  • 0.13.1
  • 0.13.0
  • 0.12.0
  • 0.11.0
  • 0.10.0
  • 0.9.0
  • 0.8.1
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.1
  • 0.3.0
  • 0.2.0
©2026, PGI / JCNS Scientific IT-Systems.