In this example you will create a page that displays a list of the content authored by the current logged-in user. This will demonstrate using Views filters and relationships to dynamically filter the view's contents at display time.

For this example, we are assuming you have a content type "Blog Post".

Creating the View

The first step is creating a view for our content list page. Because the page will show the titles of content, this view is considered a "Content" type. Go to add new view, enter the following properties, and click Next:

View name
content_by_current_user
Description
List of content authored by the current user.

Choose Show Content of type Blog Post. You can choose any way you wish to sort the content.

Creating the page

Tick the box next to Create a page. Enter a page title and a path. For our purposes here, the default settings for the rest of this page are sufficient.

Click on Continue & edit.

Creating the relationship

In order to have access to the author of the content, it is important to create a relationship between the current content type, and users.

Under Advanced in the right culumn, select add next to Relationships.

Select Content: Author and click on Add and configure relationships. Leave the settings as they are and click on Apply (all displays).

You now have access to the user data related to the content you are viewing.

Filtering the view

Now you need to filter the view to display only content authored by the current user. This data is now available for the content because you have created the relationship in the step above.

Next to Filter criteria click on add to add a new filter to your view.

Filter the list of fields by selecting User next to Filter at the top. You now have more fields than before due to the relationship you created.

Select User: Current from the list and click on Add and configure filter criteria.

Since this field is only visible due to the relationship you created, author will already be selected under Relationship. This shows that the relationship you created is being used for the filter field.

Select Yes under Is the logged in user, and click on Apply (all displays).

If you have authored content of the type Blog Post, you should now see a list of those posts under the preview section at the bottom.

Saving & testing the view

Click on Save to save the view.

You can test the view by going to the path you entered in the first part of this example.