-
-
Notifications
You must be signed in to change notification settings - Fork 899
Description
Describe the bug
When we try to change the view of an LRF, the following options appear: Summary view, Tabular view, and Album view. If we change to any of these options, the corresponding view is displayed. However, none of these views display the blocks. And we don't have an option that displays the blocks. So we can no longer display the blocks.
To Reproduce
Steps to reproduce the behavior:
- Add two available languages to the portal.
- Install
plone.app.multilingual. - In an LFR (for example en), click the three dots in the sidebar.
- In View, change to Tabular view.
- You'll see that you can no longer display the blocks. No available view displays the blocks.
Expected behavior
The "View" option should not be displayed for LRF. Or there should be an option that displays the blocks.
Screenshots
Software (please complete the following information):
- OS: Ubuntu
- Browser Chrome
- Volto Version 18
- Plone Version 6.1
- Plone REST API Version 9
Additional context
This happens because LRF has folder_listing as the default view:
But the DisplaySelect component filters the options that are displayed in View:
volto/packages/volto/src/components/manage/Display/Display.jsx
Lines 171 to 176 in 20b8b46
| const layoutOptions = layouts | |
| .filter( | |
| (layout) => | |
| Object.keys(config.views.contentTypesViews).includes(layout) || | |
| Object.keys(config.views.layoutViews).includes(layout), | |
| ) |
Since we don't have folder_listing in config.views.layoutViews:
volto/packages/volto/src/config/Views.jsx
Lines 93 to 100 in 20b8b46
| export const layoutViews = { | |
| document_view: DefaultView, | |
| summary_view: SummaryView, | |
| tabular_view: TabularView, | |
| listing_view: ListingView, | |
| link_redirect_view: LinkView, | |
| album_view: AlbumView, | |
| }; |
folder_listing is not displayed. And even if it were displayed, it wouldn't make much sense for it to display blocks. So, the best solution is also not to display the option to select a view in LRF.