Here's a use case I don't necessarily know if you wish to support but that I hope you'll consider. 😊
For our current project, we have a mix of localized and non-localized page types which we want to be able to access from the navigator. Since they all have a pathname field they automatically show up in the navigator, up until i18n is enabled at which point the list is filtered by the selected locale, causing the page types that don't have a locale field at all to disappear and become inaccessible.
This PR adds a requireLocale option which can be set to false in order to get the non-localized page types to show up in the list regardless of the filtered locale.
For example, take an employee type which maps to an employee profile page on the front-end, which we want editors to be able to live preview and edit within Presentation. These documents only have a couple of translatable fields for which we use internationalized arrays instead of separate documents. With requireLocale set to false these documents are now accessible despite not having a locale field:
Here's a use case I don't necessarily know if you wish to support but that I hope you'll consider. 😊
For our current project, we have a mix of localized and non-localized page types which we want to be able to access from the navigator. Since they all have a
pathname
field they automatically show up in the navigator, up untili18n
is enabled at which point the list is filtered by the selected locale, causing the page types that don't have alocale
field at all to disappear and become inaccessible.This PR adds a
requireLocale
option which can be set tofalse
in order to get the non-localized page types to show up in the list regardless of the filtered locale.For example, take an
employee
type which maps to an employee profile page on the front-end, which we want editors to be able to live preview and edit within Presentation. These documents only have a couple of translatable fields for which we use internationalized arrays instead of separate documents. WithrequireLocale
set tofalse
these documents are now accessible despite not having alocale
field: