Discover how Directus empowers you to manage data, create collections, customize fields, and streamline content workflows with features like Explore, Editor, and multilingual support.
Speaker 0: Directus can be used to manage both the data in your collections and the collection data models themselves, which includes setting up new collections, fields, and defining the relationships between them. Any changes made directly in your database will be recognized and reflected by directors. While collections in a directors project map to your database tables, they are not directly equivalent. Collections are your tables, plus the additional metadata required for Directus to operate correctly. There are 2 types of collections.
All Directus specific settings and data are held in system collections created and managed by Directus and never in your existing database tables. This includes user related data, including sessions, data around our automation features, activity and revision logging, and more. As an aside, it means that you can effectively remove Directus if desired with no Directus specific data left behind. We believe it's important to put you in control of your data. And while we hope you'll use directors for months years to come, you can jump out at any time.
To stop running the application, delete the tables that start with directors underscore, and it's like we were never there. User collections are created directly in your database or via directors. They describe your project's data models. Let's talk about what goes into a collection. Each collection has a unique name and strategy for creating a primary key for each item, which includes an auto incrementing number, a UUID, or a manually entered string.
At the time of creating a collection, directors can also set up some common optional fields, including status, thought, created date, created by, and so on. Next is fields. Like collections are to tables, directors fields map to fields in your database, but contain additional metadata about how they are shown in the editor within layout and in relational fields. When creating a field, the first thing to choose is the interface, which you can think of as the form input type. Directus has many built in interfaces, including a rich text editor, a map, a file picker, and more.
And you can download additional ones from the Directus marketplace. Directus also supports all standard relationship types, as well as a few more of its own compound types, which are custom tailored to make common but complex tasks easier. When creating a many to many or what we call a many to any builder relationship, directors will create the junction collection for you automatically. There are a whole set of display and validation options available for each field, which you can then configure directly from the data model settings. A quick aside that Director supports bringing an existing database, there are some first time setup needed in the data model settings to configure them with the additional details needed to turn them into directors collections.
This is all done in the Data Studio data model settings and is similar to when you create new collections. Directus Explore allows you to display and query items in a collection. Data is represented as it is stored in your database with display templates allowing custom representation with inline text, image thumbnails, dates, numbers, or anything else. Data can be displayed in any of the default or installed layouts, each with their own configuration options. Layouts include a table, Kanban board, gallery, calendar, and map, with more available in the Directus marketplace.
Now, at the top of layouts, Directus Explore has a search, which uses all top level string, text, number, and UUID fields, but also has a very powerful filter interface. You can add single filters or multiple using the and and all groups, which can then be nested. You can use the provided variables to refer to the current user or roles. Once you have everything set up the way you like, you can create a preset. Presets are saved views that contain a search, filters, sorts, visible fields, and layout information.
They can be saved for all users or specific roles or users. This allows you to create views that are more relevant to your different teams and stakeholders. Director's editor allows you to display, edit, and preview items in your collections. This page also includes options for archiving, reverting, versioning, and commenting on an item. In the editor, the field settings from when you configure the data model are applied.
This includes their chosen interfaces, position, and size, validations, conditional visibility, and more. There is a live preview that can show your changes in your real application as you save them. So you know what it will look like once you publish or rebuild your site. To use live preview, you need to have correctly configured your external application, but we have guides in our docs to help you with this. Content versioning allows teams to create and manage different versions of their content.
There are several reasons to use content versioning, including drafting content without publishing it and more ways to collaborate with others. At any point, a content version can be created and worked on in isolation. Then when ready, a content version can be promoted to become the new main version. We have a UI to select which edited field should be promoted, if not all of them. And all changes made on an item are stored in the revision history along with who made them, which is great for both accountability and also reverting changes if needed.
Directus has a lot of flexibility around translations, but it's important to note that there are 2 distinct types of translation. 1, within the data studio web application that serves your team, and 2, in the content and data that you actually author. Many parts of the Director's Data Studio are already translated into over 30 languages. This includes all UI elements and descriptions. We support community contributions to both increase the coverage for existing languages and to support new ones.
When creating collections and fields, you can set translations of names, which will be reflected if the user changes their language Data Studio. And in any other field across Directus, for example, in field descriptions, you can utilize translation strings, which can be set up in your project settings. For content translations, Directus has a dedicated translations interface to configure and author multilingual content. And that's a very quick summary of data management inside of Directus. If you have any questions, please feel free to reach out, and we'll see you in the next video.