Favorites lists on Swift depend on a service page which handles some of the internal logic related to this feature.
Manual setup
To set up this page manually:
- Go to Content > Swift Tools > Services.
- Right click the folder and add an empty page.
- Go to Page settings by clicking the circular button in the bottom right corner, and name the page Favorites list service.
- Go to the Publication tab and select Hidden in menu.
- Hit Save and close.
Next you need to add an App paragraph:
- Add an empty row.
- To this row, add an App paragraph.
- Name it Favorites list.
- Enter the App tab and select Product catalog for ViewModel in the dropdown menu.
- In the Query dropdown menu, choose SwiftProducts - Products.query.
- Scroll down to the Templates section. In the Details field, select the Favorites.cshtml file.
- Click on Save and close.
Finally you need to add a FavoriteServicePage navigation tag:
- Enter the Page settings on your Favorites service page by clicking the circular button in the bottom right corner.
- Head to the Advanced tab.
- In the Navigation section, under Navigation Tag, write FavoritesServicePage.
- Click on Save and close.