Link field

Updated

Use the link field to dynamically add links to your designs.

The link field is a Collection field that lets you dynamically add links to your designs — for example, to create registration links to third-party event services (e.g., Eventbrite) or links to social media. Link fields are typically connected to text links or buttons and can be used to filter Collection lists, or to show specific elements using conditional visibility in Collection lists or on Collection pages.

Pro tip

You can add inline links with the rich text field.

You can create a link field in any new or existing Collection. Go to your Collection settings, click Add new field, and choose Link. To add content to a link field, select a Collection item in the CMS and enter any valid URL to this field. You can use relative links (e.g., “/about-us”) in the link field.

You can connect link fields to text elements in Collection lists or on Collection pages to dynamically display the URL as text. To connect a link field to a text element:

  1. Select the text element (e.g., text block) on the canvas
  2. Go to Element settings panel > “Element” settings
  3. Check the Get text from “Collection” checkbox
  4. Choose the link field from the dropdown

You can also connect a link field to any link element, including buttons, in Collection lists or on Collection pages, to create a dynamic link. To connect a link field to a link element:

  1. Select the link element (e.g., link block, button) on the canvas
  2. Go to Element settings panel > Link settings
  3. Check the Get URL from “Collection” checkbox
  4. Choose the link field from the dropdown

You can remove connected link fields from text and link elements by unchecking the Get URL from “Collection” or Get text from “Collection” checkbox(es) in the Element settings panel.

To filter your Collection list using a link field:

  1. Select the Collection list you want to filter on the canvas
  2. Go to Element settings panel > Collection list settings > Filters
  3. Click the “plus” icon to create a filter
  4. Choose the link field from the first dropdown
  5. Choose a rule (e.g., Equals, Does not equal, etc.) from the second dropdown
  6. (Optional) Specify the value if needed
  7. Click Save

Filter rules

You can use the following filter rules with link fields:

  • Equals — looks for Collection items with a URL equal to the URL you specify for this rule
  • Does not equal — looks for Collection items with a URL that isn’t equal to the URL you specify for this rule
  • Is set — looks for Collection items that have any URL set for this link field
  • Is not set — looks for Collection items that don’t have any URL set for this link field

Learn more about filtering Collection lists.

Show or hide elements based on a link field

You can use conditionals to show or hide elements based on whether a link field is set, as long as the element is inside a Collection list or on a Collection page.

  1. Select the element to show or hide (must be inside a Collection list or on a Collection page)

  2. Go to Element settings > Visibility

  3. Click the “plus” icon

  4. Choose the link field

  5. Set the rule to Is set

  6. Set Visibility > Visible

  7. Set Else > Visibility > Hidden

  8. Click off the modal or press Esc on your keyboard to save the conditional