episerver / episerver-labs-content-manager-docs

Documentation for EPiServer.Labs.ContentManager
1 stars 0 forks source link

Grid view button does not appear in edit mode #9

Closed oyvindwh closed 3 years ago

oyvindwh commented 4 years ago

When installing the package we do not get the button to switch to grid view. See attachment.

image

oyvindwh commented 4 years ago

Looks like the config setting <add key="contentchildren:ContentContainers" value="" /> is not in use in the package?

By adding this code, the gridview shows as accepted:

public class SearchContentViewContentData : SearchContentView { }

gregwiechec commented 3 years ago

The Grid View view is not added to all content types by default.

You can do this using IsViewEnabled flag, but it's not recommended, because then the view will be added for example to all Commerce types.

Instead, please register Grid View for Content Types where it should be used:

[ServiceConfiguration(typeof(ViewConfiguration))]
public class NewsListGridView : SearchContentView<NewsPage>
{
}

We updated the documentation about this: https://github.com/episerver/episerver-labs-content-manager-docs/blob/master/GridView.md#gridview-ui-search-component