Skip to content

Commit 4c39094

Browse files
committed
add: Adding a view to a content type to views chapter
1 parent 71774a2 commit 4c39094

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/classic-ui/views.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,23 @@ You can also use the `@@` notation at the front of the view name to make sure th
230230
http://localhost:8080/Plone/news/@@my-view
231231
```
232232

233+
#### Adding a view to a content type
234+
235+
A {ref}`content type <backend-content-type-label>` can have more than one view, which a user can choose from in the display menu.
236+
In section {ref}`classic-ui-registering-a-view-label` above, you registered a view. If the view is registered with the wild card, it will be available on any content type. It is also possible to restrict this to certain content type interfaces. Please verify that your desired content type is allowed here and you can access it, like in the previous section described.
237+
238+
The list of available views for a content type is configured in it's {ref}`backend-content-types-fti-label`.
239+
240+
Add the name of the new view `my-view` to the following list:
241+
242+
```xml
243+
<property name="default_view">document_view</property>
244+
<property name="view_methods">
245+
<element value="document_view" />
246+
<element value="my-view" />
247+
</property>
248+
```
249+
233250

234251
(classic-ui-content-slots-label)=
235252

0 commit comments

Comments
 (0)