Catalog query language can be used as a powerful way to select content by writing search queries based on a number of options. For example, you can search by tags, custom fields, content types, etc.
If you have a lot of content, or want to highlight particular pieces of content in your catalog, you can use our catalog query language to determine what content should appear.
The steps below highlight how to set up the Default Content field in the Catalog specifically, but this query language can also be used in any Catalog widget with custom settings or in areas where you can filter on content, like the Content List in the Admin interface.
Where do I find this?
Settings > Content > Organization & Display
How do I do this?
- From your homepage, select Settings.
- From the left menu, select Content and then Organization & Display.
- Locate the Catalog section and scroll down to click the Show Advanced button.
- Find Default Content and click on Write Search Query to determine the queries that match your content.
- Example queries:
Note
Quotations will be needed around any values that contain a space (e.g., tags:yellow, tags:"yellow package").
- The most popular way to select content is by tag. To select all content that has the tag “Premium Package” you can use the following query:
tags:"Premium Package"
- You can write queries for Content Type. For example,
contentType:"Learning Path"
- Custom fields can also be used to write queries. You will use the dasherized version of the label for the query. This dasherized label is displayed on the list of custom fields. For example,
difficulty:Easy
- or
recipe-type:Breads
- You can also find content by authors and source, if applicable. For example,
source:"Adams LLC"
- or
authors:"Douglas Adams"
- Multiple terms can be grouped together with parentheses to form sub-queries. For example,
(tags:"Premium Package" OR tags:"Silver Package")
- The most popular way to select content is by tag. To select all content that has the tag “Premium Package” you can use the following query:
- Click Save.
What else do I need to know?
- While you can write a query that pulls content by title, we do not recommend it as the titles of content can change. You may want to select individual pieces of content instead (in which case the appropriate content will still be pulled in even if you do change a title).
Tip
Writing a query is an option in multiple places throughout the platform. Another common use case is writing queries to pull content into dynamic widgets, like custom catalog widget settings.
What does this look like?
