All sections / {current.section.title} / {current.chapter.title} / {current.topic.title} / {current.title} / {current.title} / {current.title} / {current.title}

Adding Parameters To Queries

Parameter function within queries

When working with a query, you may wish to apply the same function with different values.

To do that, you can create a parameter. In this example, we will create a filter and then use a parameter to filter the data using various different values.

Filter Icon

Create a filter by selecting the filter tool on the upper right-hand side.

Filter Settings

Filter settings will appear and from there, you can select the column, condition and value you wish to apply.

After applying the filter, you can create now the parameter.

Parameter Icon

To access the parameter section, you need to select the parameter tool on the upper right hand-side.

Parameter Settings

Parameter settings will appear and from there, you can title, name and update your parameter.

Create Parameter

Type in your expression in the box next to the parameter and change the value in the filter section. The name of the value must be identical to the title of the parameter defined in the previous section.

Saving changes

Once you have updated the column settings, the query will appear with the new parameter applied. Now you can save the changes in the bottom right-hand side.

DNSRF Corporate Logo - words and line shorter version
{item._type | case 'page' 'Web page' 'blog/blog' publication 'adnewsfeed/news' 'News' 'docs/article' 'Docs'}{item.section.title} / {item.chapter.title} / {item.topic.title}  | {category.title}
{item.publishDate | date 'DD MMM YYYY' | append ': '}