Dataset Custom Links

Data Owners can choose to add custom links to a dataset. There are two steps to this process:

  1. Creating a custom link
  2. Adding a custom link to a dataset

Users with administrative permissions can create custom links. They do this by accessing the Vocabularies tab via the Administer menu:

Administer.png

Upon opening the Vocabularies tab, the user should select the Dataset Links option from the list of customisable items:

Custom Links vocab.png

This will open the table below:

Custom links table.png

Users should enter the information required:

  • Name - this will display in the UI when the link is added to a dataset
  • URL - the URL the link should take users to
  • Target - if left blank the link will open in the existing tab when selected, if the user wishes the link to open in a different tab they should add '_blank' to this field
  • Description - the description of the link will display when a user hovers over it in the UI

When they have entered this information the user should select Modify to save the new link.

Data owners can add existing custom links to a dataset on the dataset administration tab.

When the tab is open, the user can select which custom link they would like to add from the drop down below.

Allowed links.png

When the selected link has been added, the user will get the following confirmation message:

Link update.png

The next time the user opens the dataset, the custom link will be visible in the ribbon menu for the dataset.

Custom link ribbon.png

Data owners may want to link to external sites that require user information in their URL. The following user information can now be added to a dataset link URL:

  • user.uuid
  • user.email
  • user.first_name
  • user.lastname
  • user.name

An example is provided below.

The dataset owner wants to create a link that sends the logged-in users email address and UUID to the third party site the link is for, they can do this by creating a dataset link in the following format:

https://my-external-link.com/datasets/my-dataset?email={user.email}&id={user.uuid} 

If the logged user has the email address john.doe@example.com and the user ID c18bee90-83a8-4c2e-a797-507234478777 the URL will resolve as follows:

https://my-external-link.com/datasets/my-dataset?email=john.doe@example.com&id=c18bee90-83a8-4c2e-a797-507234478777

In addition to user information, data owners can also send catalogue field information as part of a custom link e.g:

  • dataset name
  • dataset code
  • publisher name

The only catalogue field that is excluded is description.

An example is provided below:

The owner of the dataset wants to pass the dataset name as part of a custom link, they can do this by creating a dataset link in the following format:

https://my-external-link.com/{name}

If the dataset name is 'valuable data` the URL will resolve as follows:

https://my-external-link.com/valuable_data

User and catalogue data can be combined in the same custom url, an example is provided below.

The dataset owner wants to create a link that sends the logged-in users email address and UUID, and the dataset name to the third party site the link is for, they can do this by creating a dataset link in the following format:

https://my-external-link.com/datasets/my-dataset?email={user.email}&id={id}&dataset={name}

If the logged user has the email address john.doe@example.com and user ID c18bee90-83a8-4c2e-a797-507234478777, and the dataset name is valuable data the URL will resolve as follows:

https://my-external-link.com/datasets/my-dataset?email=john.doe@example.com&id=c18bee90-83a8-4c2e-a797-507234478777&dataset=valuable_data
Updated on May 13, 2024

Was this article helpful?