Views can be used to display other types of content (such as News, Events or People) in an organized way. Simply adding any one of these items will automatically update the view. To update how or where the views are displayed, see below.
How to Add a View
- Create a page or edit an existing one.
- Select the Add View from the page elements at the bottom of the page.
- Add bottom spacing under Additional options.
- Add a custom title to the view (optional).
- Select desired value from the View dropdown menu (AZ Events, AZ News, AZ Person, AZ Pages).
- Choose from one of the pre-formatted display option from the Display dropdown menu.
- Under the Options dropdown input items per page (optional).
How to Add a View to the Select List
Custom views will not be added to the select list automatically. By default, the Views component has the options: AZ Events, AZ News, AZ Pages, and AZ Person. To have a specific view available in the list, you need to add it to the component's field settings. To add a view, do the following:
- As a site Administrator, log into the site and navigate to <yoursite>/admin/structure/paragraphs_type/az_view_reference/fields
- Edit the View field (field_az_view_reference)
- In the edit form, scroll down to "Preselect View Options" and select the desired views
- Save the field
Step 1: Find the taxonomy term ID
- Navigate to Manage > Structure > Taxonomy.
- Select List Terms next to the desired category (Events, Page, Person, News).
- Select Edit next to the term.
- Copy the Term ID in the URL (Example: /term/4 means the term ID is 4). More information about Taxonomy terms can be found here.
Step 2: Add the taxonomy Term ID to a View
- Edit an existing view or create a new view as explained above.
- Enter an Argument to display only items in a certain category (Leaving this blank will display all items).
- The Argument must be the taxonomy term ID number of the category you wish to display
- You can enter:
- Single taxonomy arguments: 4
- Multiple taxonomy arguments: "4,6,3" (Taxonomy terms within double quotes and separated by comma)
- Single secondary taxonomy arguments: 8 (No double quotes used)
- Multiple secondary taxonomy arguments: 8 9 (No double quotes or comma used)
- For more information see the Taxonomy page
Sample Events View
- View: AZ Events
- Display: Grid View
Sample News View
- View: AZ News
- Display: Small Row
Sample Person View
- View: AZ person
- Display: Row Page
Sample Page View
View: AZ Pages
Display: Row Page