I'm looking for a way to find multiple views for a content type and I can't get any further.
A single view is not a problem
config.views = {
...config.views,
contentTypesViews: {
...config.views.contentTypesViews,
people: PeopleView,
},
};
But when I try to register an alternative view I get an error
I tried some Versions in the config.js like this:
config.views.contentTypesViews.people = {
...config.views.contentTypesViews.people,
default: PeopleCardView,
view: [
{id: PeopleCardView, title: "Default View"},
{id: PeopleView, title: "Custom View"}
]
};
or this:
config.views = {
...config.views,
contentTypesViews: {
...config.views.contentTypesViews,
people: {
default: PeopleCardView,
view: [
{id: PeopleCardView, title: "Default View"},
{id: PeopleView, title: "Custom View"}
]
},
},
};
The error message is
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of View
.