Dynamic Links

What are Dynamic Links

Using Dynamic Links is a handy way of changing the hyperlink on a piece of content based on some value in the database. This document explains how to add a curly bracket on the content page for the Dynamic Link.

Why you would use a Dynamic Link

To help the user get a link follow some conditions in the database. For example, if you need to add a link that is dynamic/changing and you will need to add a query/condition for it, you can use this.

Adding Dynamic Links to Content

STEP-BY-STEP
  • 1

    Go to Admin → Pages → Pages → Create New Page or edit page

    Dynamic links
  • 2

    Select Curly Bracket

    Dynamic Links
  • 3

    Click Configure button

    Dynamic Links
  • 4

    On search input field type in the Dynamic Link

    Dynamic Links
  • 5

    Select Dynamic Link

  • 6

    Enter SQL Query, Expected Result, Link If Expected Result, Link If Not Expected Result, Select Template Name

    • SQL Query - the query you need to check
    • Expected Result - result from what you checked
    • Link If Expected Result - Link you want to show if the result of a query like Expected Result
    • Link If Not Expected Result - The link you want to show if the result of the query is not like the Expected Result
    dynamic links
  • 7

    Click the Insert button

  • 8

    Click OK and Save button

  • 9

    Refresh and view the page

    Dynamic Links

How to Use a URL in an HREF Tag for Proper Linking

STEP-BY-STEP
  • 1

    The output URL is inserted between , so you have to remove outer tags to properly insert it into a href of an anchor HTML tag "< a >".

  • 2

    We have a dynamic link rendered successfully like the screenshot below, we will insert it into the page.

    Dynamic Links
  • 3

    Click view source to see the curly brackets

    Dynamic Links
  • 4

    Remove the "< curlybracke t> and < curlybracket/ >" if you want to use them in the HTML attribute.