Views

Creating Custom Views

Summary

Views, presented through pages or blocks, allow the display of dynamic content based on parameters provided.

Audience

Web Managers

Note: This is a basic guide. For a hands-on class on how to create Custom Views, Web Managers should register for and attend a Digital Solutions training session for Views. Classes are offered for Views basics and advanced Views use.

How To

  • 1

    Create a View

    When to 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


    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.

    Default View

    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.

    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:

    Hierarchical Taxonomy

    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.

    List Terms

    Blog Category

    • Add or Edit terms for Blog Category, as necessary.
    • Click List Terms beside Blog Terms.

    List Terms

    Blog Terms

    • Add or Edit terms for Blog Terms using the proper hierarchy.

    Hierarchical Taxonomy

    • Click Save.

    Save button.

  • 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.)

    Blog Terms

    • Click the desired Blog Category that the selected Blog Terms will be associated with. (In this example, Mark.)

    Blog Category

    • 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.

    Default Blog Grid.

    • Duplicate the Default Blog Grid View. 
    • Select Duplicate from the dropdown menu.

    Duplication menu option.

    • Rename the View and add "Custom" before the new name. Example: Custom Mark Blog Grid.

    View Name field.

    • Click Duplicate.

    Duplicate button.

  • 5

    Edit Custom View

    • Click Edit to edit the Custom View (e.g., Custom Mark Blog Grid).

    Edit menu option.

    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.

    Display Tabs for Page and Block

  • 6

    Page Tab

    Page Tab.

    Page Settings

    Under Page Settings (top of middle column), the Path must be changed.

    Path setting.

    • 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.

    Path field.

    • Click Apply.

    Apply button.

    • Note: Click Save often while editing display fields.

    Save button.

    Display Name

    • Under Display Name (left column), change the default name.

    Display Name setting.

    • Click the default name (Default Blog Page) and enter a new name specific to the Blog name. Example: Mark's Farm Stand Page.

    Administrative Name field.

    • Click Apply.

    Apply button.

    Title

    • Click the default title (Recent Blogs) and change it to match the Blog name. Example: Mark's Farm Stand Page.

    Title setting.

    Title field.

    • Click Apply (This Display).

    Apply button.

    Format

    • Leave Format settings as is.

    Fields

    • Leave Fields settings  as is.

    Filter Criteria

    • Click Add.

    Add menu option.

    • In the For field, select This Page (Override) from the dropdown menu.

    For field.

    • In the Search field, enter blog terms.

    Search field.

    • Check Blog Terms (field_blog_terms).

    Title checkbox.

    • Click Apply (This Display).

    Apply button.

    • Under Filter Criteria, click Content: Blog Terms.

    Blog Term settings

    • Check Expose this filter to visitors, to allow them to change it.

    Expose checkbox.

    • Select desired Terms (Ctrl+Click to select multiple terms).

    Select Blog Terms menu.

    • Check Limit list to selected items.

    Limit List checkbox.

    • Check Reduce Duplicates.

    Reduce Duplicates checkbox.

    • Click Apply (This Display).

    Apply button.

    Filter Criteria

    • Click Add.

    Add menu option.

    • In the For field, select This Page (Override) from the dropdown menu.

    For field.

    • In the Search field, enter blog category.

    Search field.

    • Check Blog Category (field_blog_category).

    Title checkbox.

    • Click Apply (This Display).

    Apply button.

    • Under Filter Criteria, click Content: Blog Category.

    Blog Category settings.

    • Do not check Expose this filter to visitors, to allow them to change it.

    Expose checkbox.

    • Select the desired Blog Category (Example: Mark)

    Blog Category menu.

    • Click Apply (This Display).

    Apply button.

    • Click Save.

    Save button.

  • 7

    Block Tab

    Block Tab

    Display Name

    • Under Display Name (left column), change the default name.

    Display name settings.

    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.

    Administrative Name field.

    • Click Apply.

    Apply button.

    • Note: Click Save often while editing display fields.

    Save button.

    Title

    • Leave the Title setting as None.

    Format

    • Leave Format settings as is.

    Fields

    • Leave Fields settings  as is.

    Filter Criteria

    • Click Add.

    Add menu option.

    • In the For field, select This Page (Override) from the dropdown menu.

    For field.

    • In the Search field, enter blog terms.

    Search field.

    • Check Blog Terms (field_blog_terms).

    Title checkbox.

    • Click Apply (This Display).

    Apply button.

    • Under Filter Criteria, click Content: Blog Terms.

    Blog Term settings.

    • Do not check Expose this filter to visitors, to allow them to change it.

    Expose checkbox.

    • Select desired Terms (Ctrl+Click to select multiple terms).

    Blog Term menu.

    • Check Reduce Duplicates.

    Reduce Duplicates checkbox.

    • Click Apply (This Display).

    Apply button.

    Filter Criteria

    • Click Add.

    Add menu option.

    • In the For field, select This Page (Override) from the dropdown menu.

    For field.

    • In the Search field, enter blog category.

    Search field.

    • Check Blog Category (field_blog_category).

    Title checkbox.

    • Click Apply (This Display).

    Apply button.

    • Under Filter Criteria, click Content: Blog Category.

    Blog Category settings

    • Do not check Expose this filter to visitors, to allow them to change it.

    Expose checkbox.

    • Select the desired Blog Category (Example: Mark).

    Blog Category menu.

    • Click Apply (This Display).

    Apply button.

    • Click Save.

    Save button.

  • 8

    Embed View

    To embed a View:

    • Open a Landing Page.
    • Add a Full Width Band.
    • Select Add View Embed from the dropdown menu.

    Add View Embed menu option.

    • In the View Embed field, select the desired View from the dropdown menu. (Example: Custom Mark Blog Grid.)

    Custom View menu options.

    • In the Display field, select the desired View Block. (Example: Mark's Farm Stand Blog Grid View Block).

    Display field.

    • Click Save.

    Save button.

    • The full-width band on the Landing Page now displays Blog entry data dynamically, based on the terms defined in the Custom View.

    Blog entry links displayed dynamically.

    • Click View All Blogs.

    View All Blogs link.

    • Select a Blog Term from the dropdown menu.

    Blog Term menu.

    • Click Apply to view Blog entries related to that term.

    Apply button.

    • Click Reset to return to the original View.

    Reset button.