Featured Items

Feature select items on an index page.

Code Level

Intermediate

Published

 

Example Description

This example demonstrates how to use two datasets on a page to split the items shown in the index into featured content and other content.

Example Code

How We Built It

The Featured Items page shows the featured recipes in a gallery and other recipes in a table. The recipes collection contains a Boolean field named featured that we use to filter the two datasets. The featured recipes dataset is filtered to only contain items marked as featured in the collection. The other recipes dataset is filtered to only contain non-featured items. Featured recipes are shown in a gallery, while the other recipes are shown in a table. ​

​​

Clicking on a recipe in the gallery or table takes you to the dynamic item page for that recipe.

​​

The Recipes (Title) dynamic page shows a single recipe based on the published URL of the page. The dynamic page URL is set to select the recipe to display based on its title.

Next Steps

  1. Open this example in the Editor to work with the template.

  2. Publish the site.

  3. Learn how to work with examples in Corvid.

APIs We Used

Related Articles

Related Examples

Add to Cart Gallery

Let customers to add products to their cart

INTERMEDIATE

Hide and Show Elements

Hide and show elements in response to user interactions

BEGGINER

Hide and Show Elements

Hide and show elements in response to user interactions

BEGGINER