davidjo1983
Forum Replies Created
-
If you only have a single parameter per page, the easiest solution is to duplicate the Gutenberg button and set an If-So condition for each one:
- First button: If → Page URL → does not contain → your parameter name and value
- Second button: If → Page URL → contains → your parameter name and value
For each button, you can then set the relevant link.
It’s important to distinguish between a permalink and a parameter.
In your example (https://mydomain.com/mywebpage/123), the number is a permalink.
A parameter, on the other hand, is an addition to the URL that doesn’t change the base address. A parameter consists of a key and a value, and looks like this:example.com?parameter=valueOr, when chaining multiple parameters:
example.com?parameter=value¶meter2=value2There are several possible solutions, and all of them may be relevant in your case. To guide you toward the best option, it’s important to:
- Understand how many different parameters or permalinks you will need.
- Determine whether you can use parameters instead of permalinks.
Yes, it is possible. It depends on some factors, such as which page builder you are using and how the button is set up (feasibility comes down to whether the button’s link field accepts shortcodes or not).
If it doesn’t work out of the box, it shouldn’t be complicated to create the button in a way that does—using HTML, for example.
As for pulling the query string into the link, you have two options:
- Query String DKI shortcode – You pick a parameter, and the value of that parameter is generated automatically.
https://www.if-so.com/query-string-dki-shortcode/ - Trigger with a Page URL condition – For example, if the page URL contains
?your_parameter=value, you can set up the link manually according to your needs when the condition is met.
https://www.if-so.com/help/documentation/page_url/