Skip to content

Commit efcbfe7

Browse files
Merge pull request #37 from directus/writeup/content
Write up Content section
2 parents 7024351 + fc4d85c commit efcbfe7

File tree

7 files changed

+576
-17
lines changed

7 files changed

+576
-17
lines changed

content/3.content/1.explore.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,61 @@
11
---
2-
description:
2+
description: Learn to filter, layout, batch edit and more with collections in the collection explorer.
33
---
44

55
# Collection Explorer
66

77
The content module allows users to browse, filter, and search for items held in collections. When users navigate into viewing single items, they use :product-link{product="editor"}. Each page contains data from a single collection, but can display related fields for each item.
88

9+
To open the collection explorer, click on the content module on the left hand side of the page.
10+
911
<!-- TODO: IMAGE OF EXPLORE -->
1012

1113
## Filtering Items
1214

15+
<!-- TODO: IMAGE OF FILTERS -->
16+
17+
You can create custom filters to display items that fulfill certain criteria.
18+
19+
Click on :icon{name="material-symbols:filter-list"} 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.
20+
21+
### And / Or Groups
22+
23+
`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.
24+
25+
In order for filters to be included in `AND` or `OR` groups, filters must be indented below them in the filter UI.
26+
27+
### Dynamic Variables
28+
29+
<!-- TODO: Image -->
30+
31+
The following dynamic variables are built into Directus to add extra functionality to filters:
32+
33+
- **`$CURRENT_USER`** — The primary key of the currently authenticated user.
34+
- **`$CURRENT_ROLE`** — The primary key of the role for the currently authenticated user.
35+
- **`$CURRENT_ROLES`** - An array of roles containing the `$CURRENT_ROLE` and any roles included within it.
36+
- **`$CURRENT_POLICIES`** - An array of policies assigned to the user directly, or through their roles.
37+
- **`$NOW`** — The current timestamp.
38+
- **`$NOW(<adjustment>)`** - The current timestamp plus/minus a given distance, for example `$NOW(-1 year)`, `$NOW(+2 hours)`.
39+
1340
## Layouts
1441

42+
Layouts are customized mechanisms for viewing and interacting with the items in a collection. You can [select a layout](/content/layouts) for displaying your collection. Note that restrictions will apply depending on your collection's [data model](/data-modeling/collections).
43+
1544
## Batch Editing
1645

17-
## Layout Presets
46+
<!-- TODO: Image -->
47+
48+
By selecting more than one item in the explorer will allow you to click on :icon{name="material-symbols:filter-list} and edit several items' fields at once to have the same value.
49+
50+
## Bookmarks
51+
52+
<!-- TODO: Image of explorer with bookmarks -->
53+
54+
Bookmarks are custom views for your collections that include specified configurations, layouts, visible fields, sorting, filtering and more.
55+
56+
To create a bookmark, navigate to the Settings -> Bookmarks module. Here, you can create a new one by clicking on :icon{name="material-symbols:add-circle-outline-rounded"}.
1857

19-
## Access Control
58+
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.
2059

2160
<!--
2261

content/3.content/2.editor.md

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,86 @@
11
---
2-
description:
2+
description: Learn to create, duplicate, archive and perform other actions with items using Directus.
33
---
44

55
# Item Editor
66

7-
<!-- PREAMBLE ABOUT EDITOR -->
7+
The item editor is a tailored form for managing individual items and their field values.
88

99
<!-- TODO: IMAGE OF EDITOR -->
1010

1111
## Fields & Data Model
1212

13-
<!-- Small copy, link to data modeling items -->
14-
<!-- Half/full width, Hidden fields from data modeling settings -->
13+
You can add fields to items by [configuring the collection's data model](/data-modeling/fields). Here, you can also configure how the fields are displayed in the item editor.
1514

1615
## Creating Items
1716

17+
To create an item, click :icon{name="material-symbols:add-circle-outline-rounded"} in the page header to open the item page.
18+
19+
Fill in the fields as desired. Note that some of these will be [marked as required](/data-modeling/fields) and need to be filled in, or be dynamic fields. Relations will be filled in here, too.
20+
21+
::callout{type="info" title="Singletons"}
22+
23+
If the collection is configured as a [singleton](/data-modeling/collections) in the data model
24+
settings, the App will automatically open the item page when selecting the collection.
25+
26+
::
27+
1828
## Duplicating Items
1929

20-
<!-- Save as copy when small change -->
30+
<!-- TODO: IMAGE -->
31+
32+
When editing an item, you can click on :icon{name="material-symbols:more-vert"} to select some advanced options, amongst them "Save as Copy". Selecting this will save a copy.
2133

2234
## Archiving Items
2335

24-
<!-- 'soft delete' -->
36+
To archive an item, follow these steps, navigate to the content module and select the desired collection. Select the desired item to open the item editor. Click :icon{name="material-symbols:archive"} located in the header and a popup will appear to confirm the action.
37+
38+
Archived items will not show up in search results or be returned in API responses. They still exist and can be retrieved using specific queries. Archiving can therefore be seen as a form of "soft deleting" an item.
39+
40+
::callout{type="info" title="Requires Configuration"}
41+
42+
Archiving requires an [archive field](/data-modeling/collections) to be configured within the collection's data model
43+
settings.
44+
45+
::
2546

2647
## Revisions
2748

49+
<!-- TODO: IMAGE -->
50+
51+
As you update field values on items, Directus saves these revisions, and they can be compared side-by-side to the current state.
52+
53+
To revert an item, navigate to the content module and select the desired collection and select the desired item. Click on "Revisions" in the editor sidebar and then on the revision you wish to preview. Go to "Revisions Made" in the side menu and view the revision differences. Click :icon{name="material-symbols:settings-backup-restore"} to revert the item's values and return to the item page.
54+
55+
::callout{type="info" title="Revision Preview"}
56+
57+
You will also see a "Revision Preview" button in the side menu navigation, which will let you preview all the item's
58+
values for that revision.
59+
60+
::
61+
62+
::callout{type="info"}
63+
64+
You can also revert items [programmatically via the API](/api-reference/system/revisions).
65+
66+
:::
67+
2868
## Comments
2969

70+
<!-- TODO: IMAGE -->
71+
72+
You can add comments to items in the sidebar by clicking on "Comments", which will show the form for submitting one. You can use the @ button to tag specific users in your comment.
73+
3074
## Shares
3175

76+
<!-- TODO: IMAGE -->
77+
78+
You can create shareable links to view an item in the sidebar by clicking on Shares -> New Share.
79+
80+
Here, you can specify the name, password, roles allowed to access the item, as well as the start and end dates for the link's validity, followed by the maximum times a link can be used.
81+
82+
To share the link, click on the new share's :icon{name="material-symbols:more-horiz"} and select either "Copy Link" or "Send Link". You can also edit or destroy the share in this menu.
83+
3284
## Next Steps
3385

34-
<!-- Link to Content Versioning, Live Preview -->
86+
Learn how to use [content versioning](/content/content-versioning) and the [live preview](/content/live-preview) functionality.

0 commit comments

Comments
 (0)