You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Payload dynamically generates a beautiful, [fully type-safe](../typescript/overview)admin panel to manage your users and data. It is highly performant, even with 100+ fields, and is translated in over 30 languages. Within the Admin Panel you can manage content, [render your site](../live-preview/overview), preview drafts, [diff versions](../versions/overview), and so much more.
9
+
Payload dynamically generates a beautiful, [fully type-safe](../typescript/overview)Admin Panel to manage your users and data. It is highly performant, even with 100+ fields, and is translated in over 30 languages. Within the Admin Panel you can manage content, [render your site](../live-preview/overview), preview drafts, [diff versions](../versions/overview), and so much more.
10
10
11
11
The Admin Panel is designed to [white-label your brand](https://payloadcms.com/blog/white-label-admin-ui). You can endlessly customize and extend the Admin UI by swapping in your own [Custom Components](./components)—everything from simple field labels to entire views can be modified or replaced to perfectly tailor the interface for your editors.
Copy file name to clipboardExpand all lines: docs/authentication/http-only-cookies.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ In this scenario, if your cookie was still valid, malicious-intent.com would be
65
65
66
66
### CSRF Prevention
67
67
68
-
Define domains that your trust and are willing to accept Payload HTTP-only cookie based requests from. Use the `csrf` option on the base Payload config to do this:
68
+
Define domains that your trust and are willing to accept Payload HTTP-only cookie based requests from. Use the `csrf` option on the base Payload Config to do this:
Authentication is used within the [Admin Panel](../admin/overview) itself as well as throughout your app(s) themselves however you determine necessary.
_Admin Panel screenshot depicting an Admins Collection with Auth enabled_
23
23
24
24
**Here are some common use cases of Authentication outside of Payload's dashboard itself:**
@@ -73,7 +73,7 @@ Once enabled, each document that is created within the Collection can be thought
73
73
74
74
## Authentication Strategies
75
75
76
-
Out of the box Payload ships with a few powerful authentication strategies. HTTP-Only Cookies, JWT's and API-Keys, they can work together or individually. You can also have multiple collections that have auth enabled, but only 1 of them can be used to log into the admin panel.
76
+
Out of the box Payload ships with a few powerful authentication strategies. HTTP-Only Cookies, JWT's and API-Keys, they can work together or individually. You can also have multiple collections that have auth enabled, but only 1 of them can be used to log into the Admin Panel.
Copy file name to clipboardExpand all lines: docs/cloud/projects.mdx
+2-2
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ From there, you are ready to make updates to your project. When you are ready to
98
98
99
99
## Cloud Plugin
100
100
101
-
Projects generated from a template will come pre-configured with the official Cloud Plugin, but if you are using your own repository you will need to add this into your project. To do so, add the plugin to your Payload config:
101
+
Projects generated from a template will come pre-configured with the official Cloud Plugin, but if you are using your own repository you will need to add this into your project. To do so, add the plugin to your Payload Config:
102
102
103
103
`yarn add @payloadcms/plugin-cloud`
104
104
@@ -113,7 +113,7 @@ export default buildConfig({
113
113
```
114
114
115
115
<Bannertype="warning">
116
-
**Note:** If your Payload config already has an email with transport, this will take precedence
116
+
**Note:** If your Payload Config already has an email with transport, this will take precedence
A Collection is a group of records, called Documents, that share a schema. You can define as many Collections as your application needs. Each Collection will automatically scaffold a new collection or table in your [Database](../database/overview) based on the [Fields](../fields/overview) that you define.
9
+
A Collection is a group of records, called Documents, that share a common schema. You can define as many Collections as your application needs. Each Collection saves to the [Database](../database/overview) based on the [Fields](../fields/overview) that you define.
10
+
11
+
Collections are the primary way to structure recurring data in your application, such as users, products, pages, posts, and other types of content that you might want to manage. Each Collection can have its own unique [Access Control](../access-control/overview), [Hooks](../hooks/overview), [Admin Options](#admin-options), and more.
12
+
13
+
Collections will automatically generate their own [Local API](../local-api/overview). If your application is using the [Admin Panel](../admin/overview), you will also get a fully-featured [REST API](../rest-api/overview) and [GraphQL API](../graphql/overview) without any additional configuration.
10
14
11
15
To define a Collection Config, use the `collection` property in your [Payload Config](./overview):
For a more complex example, see the [Public Demo](https://github.com/payloadcms/public-demo) source code on GitHub.
50
+
For a more complex example, see the [Public Demo](https://github.com/payloadcms/public-demo) source code on GitHub, or the [Templates](https://github.com/payloadcms/payload/tree/main/templates) and [Examples](https://github.com/payloadcms/payload/tree/main/examples) directories in the Payload repository.
47
51
</Banner>
48
52
49
53
The following options are available:
@@ -60,7 +64,7 @@ The following options are available:
60
64
|**`endpoints`**| Add custom routes to the REST API. Set to `false` to disable routes. [More details](../rest-api/overview#custom-endpoints). |
61
65
|**`fields`**\*| Array of field types that will determine the structure and functionality of the data stored within this Collection. [Click here](../fields/overview) for a full list of field types as well as how to configure them. |
62
66
|**`graphQL`**| An object with `singularName` and `pluralName` strings used in schema generation. Auto-generated from slug if not defined. Set to `false` to disable GraphQL. |
63
-
|**`hooks`**| Entry points to "tie in" to Collection actions at specific points. [More details](../hooks/overview#collection-hooks). |
67
+
|**`hooks`**| Entry point for Hooks. [More details](../hooks/overview#collection-hooks). |
64
68
|**`labels`**| Singular and plural labels for use in identifying this Collection throughout Payload. Auto-generated from slug if not defined. |
65
69
|**`slug`**\*| Unique, URL-friendly string that will act as an identifier for this Collection. |
66
70
|**`timestamps`**| Set to false to disable documents' automatically generated `createdAt` and `updatedAt` timestamps. |
@@ -70,11 +74,23 @@ The following options are available:
70
74
71
75
_\* An asterisk denotes that a property is required._
72
76
73
-
## Admin Options
77
+
### Fields
78
+
79
+
Fields define the schema of the Documents within a Collection. To learn more, go to the [Fields](../fields/overview) documentation.
80
+
81
+
### Access Control
82
+
83
+
Access Control determines what a user can and cannot do with a Document. To learn more, go to the [Access Control](../access-control/overview) docs.
84
+
85
+
### Hooks
86
+
87
+
Hooks allow you to tie into the lifecycle of your Documents so you can execute your own logic during specific events. To learn more, go to the [Hooks](../hooks/overview) documentation.
88
+
89
+
### Admin Options
74
90
75
91
You can customize the way that the [Admin Panel](../admin/overview) behaves on a Collection-by-Collection basis.
76
92
77
-
To configure Collection Admin Options, use the `admin` property in your Collection Config:
93
+
To configure Admin Options for Collections, use the `admin` property in your Collection Config:
78
94
79
95
```ts
80
96
import { CollectionConfig } from'payload'
@@ -144,7 +160,7 @@ The preview function receives two arguments:
144
160
For fully working example of this, check of the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview) in the [Examples Directory](https://github.com/payloadcms/payload/tree/main/examples).
145
161
</Banner>
146
162
147
-
### Pagination
163
+
####Pagination
148
164
149
165
All Collections receive their own List View which displays a paginated list of documents that can be sorted and filtered. The pagination behavior of the List View can be customized on a per-Collection basis.
150
166
@@ -173,17 +189,7 @@ The following options are available:
173
189
|`defaultLimit`| Integer that specifies the default per-page limit that should be used. Defaults to 10. |
174
190
|`limits`| Provide an array of integers to use as per-page options for admins to choose from in the List View. |
175
191
176
-
### Access Control
177
-
178
-
You can specify extremely granular access control (what users can do with documents in a Collection) on a Collection by
179
-
Collection basis. To learn more, go to the [Access Control](../access-control/overview) docs.
180
-
181
-
### Hooks
182
-
183
-
Hooks are a powerful way to extend Collection functionality and execute your own logic, and can be defined on a
184
-
Collection by Collection basis. To learn more, go to the [Hooks](../hooks/overview) documentation.
185
-
186
-
### List Searchable Fields
192
+
#### List Searchable Fields
187
193
188
194
In the List View, there is a "search" box that allows you to quickly find a document through a simple text search. By default, it searches on the ID field. If defined, the `admin.useAsTitle` field is used. Or, you can explicitly define which fields to search based on the needs of your application.
Globals are in many ways similar to [Collections](../configuration/collections), except they correspond to only a single Document. Globals are perfect for things like header nav, site-wide banner alerts, app-wide localized strings, and other "global" data that your site or app might rely on.
9
+
Globals are in many ways similar to [Collections](../configuration/collections), except they correspond to only a single Document. You can define as many Globals as your application needs. Each Global saves to the [Database](../database/overview) based on the [Fields](../fields/overview) that you define.
10
+
11
+
Globals are the primary way to structure singletons in Payload, such as a header navigation, site-wide banner alerts, or app-wide localized strings. Each Global can have its own unique [Access Control](../access-control/overview), [Hooks](../hooks/overview), [Admin Options](#admin-options), and more.
12
+
13
+
Globals will automatically generate their own [Local API](../local-api/overview). If your application is using the [Admin Panel](../admin/overview), you will also get a fully-featured [REST API](../rest-api/overview) and [GraphQL API](../graphql/overview) without any additional configuration.
10
14
11
15
To define a Global Config, use the `globals` property in your [Payload Config](./overview):
For a more complex example, see the [Public Demo](https://github.com/payloadcms/public-demo) source code on GitHub.
60
+
For a more complex example, see the [Public Demo](https://github.com/payloadcms/public-demo) source code on GitHub, or the [Templates](https://github.com/payloadcms/payload/tree/main/templates) and [Examples](https://github.com/payloadcms/payload/tree/main/examples) directories in the Payload repository.
57
61
</Banner>
58
62
59
63
The following options are available:
@@ -68,28 +72,31 @@ The following options are available:
68
72
|**`endpoints`**| Add custom routes to the REST API. [More details](../rest-api/overview#custom-endpoints). |
69
73
|**`fields`**\*| Array of field types that will determine the structure and functionality of the data stored within this Global. [Click here](../fields/overview) for a full list of field types as well as how to configure them. |
70
74
|**`graphQL.name`**| Text used in schema generation. Auto-generated from slug if not defined. |
71
-
|**`hooks`**| Entry points to "tie in" to collection actions at specific points. [More details](../hooks/overview#global-hooks). |
75
+
|**`hooks`**| Entry point for Hooks. [More details](../hooks/overview#global-hooks). |
72
76
|**`label`**| Text for the name in the Admin Panel or an object with keys for each language. Auto-generated from slug if not defined. |
73
77
|**`slug`**\*| Unique, URL-friendly string that will act as an identifier for this Global. |
74
78
|**`typescript`**| An object with property `interface` as the text used in schema generation. Auto-generated from slug if not defined. |
75
79
|**`versions`**| Set to true to enable default options, or configure with object properties. [More details](../versions/overview#globals-config). |
76
80
77
81
_\* An asterisk denotes that a property is required._
78
82
83
+
### Fields
84
+
85
+
Fields define the schema of the Global. To learn more, go to the [Fields](../fields/overview) documentation.
79
86
80
87
### Access Control
81
88
82
-
As with Collections, you can specify extremely granular access control (what users can do with this Global) on a Global-by-Global basis. However, Globals only have `update` and `read` access control due to their nature of only having one document. To learn more, go to the [Access Control](../access-control/overview) docs.
89
+
Access Control determines what a user can and cannot do with a Document. To learn more, go to the [Access Control](../access-control/overview) docs.
83
90
84
91
### Hooks
85
92
86
-
Globals also fully support a smaller subset of Hooks. To learn more, go to the [Hooks](../hooks/overview) documentation.
93
+
Hooks allow you to tie into the lifecycle of your Documents so you can execute your own logic during specific events. To learn more, go to the [Hooks](../hooks/overview) documentation.
87
94
88
95
### Admin Options
89
96
90
97
You can customize the way that the [Admin Panel](../admin/overview) behaves on a Global-by-Global basis.
91
98
92
-
To configure Collection Admin Options, use the `admin` property in your Global Config:
99
+
To configure Admin Options for Globals, use the `admin` property in your Global Config:
Payload's backend sets the language on incoming requests before they are handled. This allows backend validation to return error messages in the user's own language or system generated emails to be sent using the correct translation. You can make HTTP requests with the `accept-language` header and Payload will use that language.
137
137
138
-
Anywhere in your Payload app that you have access to the `req` object, you can access payload's extensive internationalization features assigned to `req.i18n`. To access text translations you can use `req.t('namespace:key')`.
138
+
Anywhere in your Payload app that you have access to the `req` object, you can access Payload's extensive internationalization features assigned to `req.i18n`. To access text translations you can use `req.t('namespace:key')`.
0 commit comments