Skip to content

Add docs on how to add links to Table components #102

Description

@tagspace

What the customer can do is provide a standard markdown-formatted link, like this in their models:

Click Here
And the table will detect that and convert it to:

Click Here
It’s improbable that most customers are storing links as markdown directly in their DB, so what they’d need to do is create a Measure in their model file that does the conversion. You provided an example, which I left in the V1 repo products.cube.yml since I think it’s handy to have, that looks like this:

  - name: link_to_product
    sql: FORMAT('[%s](%s)', name, 'https://www.google.com/search?q='||name)
    type: string
    meta:
      link: true

Where it’s taking the name of the product, and then concatenating it into a URL. The client would of course not be linking Google, but it’d be the same basic strategy. They could get as complicated as they want, eg a URL that contained an id, a name, a tracking number, etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions