9.4. Duplicating a View
Create a page listing recipes by duplicating the existing Vendors view. Modify the page so that the recipes are displayed in a grid and can by filtered by ingredients.
- The Vendor and Recipe content types must exist; both must have Main image fields, and the Recipe content type must have an Ingredients field. Your site must also have a couple of Recipe content items. See Secció 6.1, «Adding a Content Type», Secció 6.3, «Adding Basic Fields to a Content Type», Secció 6.6, «Setting Up a Taxonomy», Secció 6.9, «Changing Content Entry Forms», and Secció 5.2, «Creating a Content Item».
- The Vendors view must exist. See Secció 9.3, «Creating a Content List View».
In the Manage administrative menu, navigate to Structure > Views (admin/structure/views). Find the view "Vendors" and click Duplicate in its dropdown button.

- Name the duplicate "Recipes" and click Duplicate. The view configuration page appears.
Change the title of the view page to "Recipes" by clicking Vendors in the Title section. The Page: The title of this view pop-up appears. Type in "Recipes". Click Apply.

- Change from a table to a grid format by clicking Table in the Format section. The Page: How should this view be styled pop-up appears. Check Grid and click Apply. The Page: Style options pop-up appears. Retain the default values and click Apply.
- Retain only the title and image fields for the Recipes view by clicking Content: Body in the Fields section. Click Remove in the pop-up that appears.
- Change the content type filter to use the Recipe content type by clicking Content: Type (=Vendor) in the Filter criteria section. In the Configure filter criterion: Content: Type pop-up, check Recipe and uncheck Vendor. Click Apply.
- Add a further filter that is exposed to visitors by clicking Add in the Filter criteria section. Search for "ingredients" and check "Ingredients (field_ingredients)". Click Add and configure filter criteria.
The appearing pop-up offers extra settings on vocabulary and selection type. Click Apply and continue. The next pop-up allows you to expose this filter to visitors. Fill in the fields as shown below.
Field name Explanation Example value Expose this filter to visitors, to allow them to change it
Allow visitors to filter and search
Checked
Required field
Whether a value has to be provided or not
Unchecked
Label
Label shown for this filter on the view page
Find recipes using…

Change the Path label field to "Recipes" by clicking "/vendors" in the Page settings section. In the pop-up that appears, enter the path "recipes" and click Apply.
Note that when editing a view, you enter paths without the leading "/", unlike on other administrative pages (such as when providing a path to a content item page).
- Change the menu link title by clicking "Normal: Vendors" in the Page settings section. In the pop-up that appears, change the title to "Recipes" and click Apply.
- In order to use Ajax (see Ajax entry in the Glossary) to make filtering and paging faster for users, click Advanced to expand the section for more options. In the Other section, change Use Ajax: No to "Yes" by clicking No and checking Use Ajax in the pop-up that appears. Click Apply.
- Click Save to save the view.
Go back to the home page and click Recipes in the navigation to view the new Recipes page.

The link to the view in the main navigation will probably not be in the right place. Change the order of the menu items in the main navigation. See Secció 5.8, «Changing the Order of Navigation».
Attributions
Written and edited by Laura Vass at Pronovix, and Jojy Alphonso at Red Crackle.
Source file: views-duplicate.asciidoc
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion