How To
-
1
Create a Custom View
Explore Default Views First
The Digital Commons platform offers a range of pre-designed default views that are integrated into the platform's core and styled to offer the best possible user experience. Before creating a Custom View, consider if one of the Default Views already available on your website will serve your needs. These "pages" already exist, you simply choose which View you want to link to for your visitors.
What are Default Views?
Default Views are templates that can be used as is, or duplicated to create Custom Views. Example: Default Blog Grid.
Note: Default Views must not be edited. They are overwritten every two to three weeks, erasing any changes made to them.
Where are my Default Views?
Explore the Default Views by adding the following to your "agency.gov" homepage address.
- /blog (grid view of blogs)
- /blog-entry-list (listing view of blogs)
- /events (listing view of upcoming events)
- /past-events (listing view of past events)
- /upcoming-events-page (upcoming events in a grid view)
- /news/press-releases (listing view of press releases)
When should I use a View?
A View should be used when:
- The dataset is dynamic or built into a content type.
- Creating a subset of data using the same content type.
- Artifacts are tagged.
- Data can be filtered.
Note: For static information with a small dataset (less than 20) not built into a content type, it is best to use a Data Table.
Examples of items presented with Views include:
- Press Releases
- Document Nodes and Files
- Events
- Blogs
- RSS Feeds
Our team is ready to collaborate with you to develop custom views tailored to your specific requirements, and we also offer resources to ensure you can make the most of these views.
Block View
An embedded Block View presents a small sample of data on a Landing Page or Site Page.
Page View
A Page View is dynamic like the embedded Block View, but has a URL that can be added to a menu.
Taxonomy
Views are achieved mainly through use of Taxonomy, or the practice of classifying content in an organized fashion.
Taxonomy terms are called Vocabularies and can be Hierarchical or Flat.
Hierarchical Taxonomy
Hierarchical Taxonomy is a ranked series of terms with a parent/child relationship.
In the example below, the term Meat is the parent term. Chicken, Fish, Pork, and Steak are child terms:
Flat Taxonomy
Flat Taxonomy features parallel terms with no parent/child relationship.
Example
The steps below describe how to create a Custom View using a Blog as an example.
-
2
Set Taxonomy
Prior to creating a view, ensure the proper Taxonomy is in place. If not, then create the needed terms using Hierarchical Taxonomy.
Navigate to:
- Structure > Taxonomy.
- Click List Terms beside Blog Category.
- Add or Edit terms for Blog Category, as necessary.
- Click List Terms beside Blog Terms.
- Add or Edit terms for Blog Terms using the proper hierarchy.
- Click Save.
-
3
Create or Edit Blog
Navigate to:
- Content > Add Content > Blog Entry.
- Otherwise, edit an existing Blog.
- Fill or edit fields as necessary, including Release Date.
- Scroll down to Blog Terms and Blog Category.
- The terms defined in Taxonomy appear under each.
- Click the desired Blog Terms to select them. (In this example, Grapes, Wake, Chapel Hill, etc.)
- Click the desired Blog Category that the selected Blog Terms will be associated with. (In this example, Mark.)
- The selected terms will be used to create a Custom View.
- Publish or Save the Blog.
-
4
Create a Custom View
Navigate to:
- Structure > Views.
- All Default Views begin with the word "Default."
- Scroll down to Default Blog Grid.
- Duplicate the Default Blog Grid View.
- Select Duplicate from the dropdown menu.
- Rename the View and add "Custom" before the new name. Example: Custom Mark Blog Grid.
- Click Duplicate.
-
5
Edit Custom View
- Click Edit to edit the Custom View (e.g., Custom Mark Blog Grid).
Displays
Under Displays (top left) are tabs for the Blog Page and Blog Grid View Block. Fields under each of these tabs must be edited.
-
6
Page Tab
Page Settings
Under Page Settings (top of middle column), the Path must be changed.
- Click the default Path URL (/blog) and enter a custom URL, specific to the Blog page name. Example: blog/mark-farm-stand-page.
- Note: This Path change is critically important.
- Click Apply.
- Note: Click Save often while editing display fields.
Display Name
- Under Display Name (left column), change the default name.
- Click the default name (Default Blog Page) and enter a new name specific to the Blog name. Example: Mark's Farm Stand Page.
- Click Apply.
Title
- Click the default title (Recent Blogs) and change it to match the Blog name. Example: Mark's Farm Stand Page.
- Click Apply (This Display).
Format
- Leave Format settings as is.
Fields
- Leave Fields settings as is.
Filter Criteria
- Click Add.
- In the For field, select This Page (Override) from the dropdown menu.
- In the Search field, enter blog terms.
- Check Blog Terms (field_blog_terms).
- Click Apply (This Display).
- Under Filter Criteria, click Content: Blog Terms.
- Check Expose this filter to visitors, to allow them to change it.
- Select desired Terms (Ctrl+Click to select multiple terms).
- Check Limit list to selected items.
- Check Reduce Duplicates.
- Click Apply (This Display).
Filter Criteria
- Click Add.
- In the For field, select This Page (Override) from the dropdown menu.
- In the Search field, enter blog category.
- Check Blog Category (field_blog_category).
- Click Apply (This Display).
- Under Filter Criteria, click Content: Blog Category.
- Do not check Expose this filter to visitors, to allow them to change it.
- Select the desired Blog Category (Example: Mark)
- Click Apply (This Display).
- Click Save.
-
7
Block Tab
Display Name
- Under Display Name (left column), change the default name.
Click the default name (Default Blog Grid View Block) and enter a new name specific to the Blog name. Example: Mark's Farm Stand Blog Grid View Block.
- Click Apply.
- Note: Click Save often while editing display fields.
Title
- Leave the Title setting as None.
Format
- Leave Format settings as is.
Fields
- Leave Fields settings as is.
Filter Criteria
- Click Add.
- In the For field, select This Page (Override) from the dropdown menu.
- In the Search field, enter blog terms.
- Check Blog Terms (field_blog_terms).
- Click Apply (This Display).
- Under Filter Criteria, click Content: Blog Terms.
- Do not check Expose this filter to visitors, to allow them to change it.
- Select desired Terms (Ctrl+Click to select multiple terms).
- Check Reduce Duplicates.
- Click Apply (This Display).
Filter Criteria
- Click Add.
- In the For field, select This Page (Override) from the dropdown menu.
- In the Search field, enter blog category.
- Check Blog Category (field_blog_category).
- Click Apply (This Display).
- Under Filter Criteria, click Content: Blog Category.
- Do not check Expose this filter to visitors, to allow them to change it.
- Select the desired Blog Category (Example: Mark).
- Click Apply (This Display).
- Click Save.
-
8
Embed View
To embed a View:
- Open a Landing Page.
- Add a Full Width Band.
- Select Add View Embed from the dropdown menu.
- In the View Embed field, select the desired View from the dropdown menu. (Example: Custom Mark Blog Grid.)
- In the Display field, select the desired View Block. (Example: Mark's Farm Stand Blog Grid View Block).
- Click Save.
- The full-width band on the Landing Page now displays Blog entry data dynamically, based on the terms defined in the Custom View.
- Click View All Blogs.
- Select a Blog Term from the dropdown menu.
- Click Apply to view Blog entries related to that term.
- Click Reset to return to the original View.