Introduction
As explained in Global parameters, all views have a set of global parameters that can be configured and modified by users. Although these are managed automatically for running queries, you can also read and display their values in your views using theparam function.
Basic usage
Here’s an example of how to use theparam function to read the value of a global parameter:
Input component is used to set the value of the name parameter, and the Text component is used to display the value of the name parameter.
The text shown in the Text component will be updated automatically whenever the value of the name parameter changes.
Fallback
You can also use parameters that may be present in the URL but do not have any associated Input component. However, if the parameter is not present in the URL either, you can provide a fallback value as the second argument to theparam function. Otherwise, the function will return undefined.