Content

Collection Explorer

Learn to filter, layout, batch edit and more with collections in the collection explorer.

The content module allows users to browse, filter, and search for items held in collections. When users navigate into viewing single items, they use Editor. Each page contains data from a single collection, but can display related fields for each item.

To open the collection explorer, click on the content module on the left hand side of the page.

The content module showing a list of posts

Filtering Items

The content module showing a list of posts, with the filter popup open

You can create custom filters to display items that fulfill certain criteria.

Click on at the top of the page to create a filter. You can then select a field to filter by and click on the criterion to tweak what should pass for that item to be filtered.

And / Or Groups

AND groups give the option to filter for items that meet all of several criteria. On the other hand, OR groups filter for items that meet any one of several criteria.

In order for filters to be included in AND or OR groups, filters must be indented below them in the filter UI.

Dynamic Variables

The content module showing a list of posts, with the filters using the $NOW dynamic variables

The following dynamic variables are built into Directus to add extra functionality to filters:

  • $CURRENT_USER — The primary key of the currently authenticated user.
  • $CURRENT_ROLE — The primary key of the role for the currently authenticated user.
  • $CURRENT_ROLES - An array of roles containing the $CURRENT_ROLE and any roles included within it.
  • $CURRENT_POLICIES - An array of policies assigned to the user directly, or through their roles.
  • $NOW — The current timestamp.
  • $NOW(<adjustment>) - The current timestamp plus/minus a given distance, for example $NOW(-1 year), $NOW(+2 hours).

Layouts

Layouts are customized mechanisms for viewing and interacting with the items in a collection. You can select a layout for displaying your collection. Note that restrictions will apply depending on your collection's data model.

Batch Editing

Batch editing a set of posts

By selecting more than one item in the explorer will allow you to click on and edit several items' fields at once to have the same value.

Bookmarks

The list of bookmarks

Bookmarks are custom views for your collections that include specified configurations, layouts, visible fields, sorting, filtering and more.

To create a bookmark, navigate to the Settings -> Bookmarks module. Here, you can create a new one by clicking on .

You'll see the "Editing Preset" form, where you can set the name and collection, amongst layout and other values for this bookmark. Note that leaving the name field empty will make it so this bookmark is what is viewed for this collection by default.