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
-
1
Go to Admin → Pages → Pages → Create New Page or edit page
-
2
Select Curly Bracket
-
3
Click Configure button
-
4
On search input field type in the Dynamic Link
-
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
-
7
Click the Insert button
-
8
Click OK and Save button
-
9
Refresh and view the page
How to Use a URL in an HREF Tag for Proper Linking
-
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.
-
3
Click view source to see the curly brackets
-
4
Remove the "< curlybracke t> and < curlybracket/ >" if you want to use them in the HTML attribute.