Exam4Training

How can you modify the view to support filtering by ingredient?

You are building a recipe site in which users submit their favorite recipes as nodes, tagged with common ingredients from a carefully curated taxonomy vocabulary. You’ve been asked to create a page on which site visitors can select the ingredients they have on hand and view all the site’s recipes that use those ingredients. You’ve already created a view listing all Recipe nodes

How can you modify the view to support filtering by ingredient?
A . Create a filter using the Recipe content type’s "Ingredients" field Expose the filter to users, making sure it allows multiple selections
B . For each ingredient, create a separate view display with a contextual filter to limit results by that ingredient
C . Include a "Combine fields" filter that searches all fields for the ingredient name(s) the user enters.
D . Add a menu block listing all ingredients Each item in the menu block should link to a subdirectory URL associated with the listed ingredient

Answer: A

Exit mobile version