MotivationYet another customer project. But fear not, it's already implemented and works quite nicely. Well, there are a still a few problems with the Neos backend interface, but those should not be too hard to resolve I guess. And I had to write an aspect to feed additional preset data to the ContentDimensionPresetRepository-thingy. Might be more fun without it.
Status quoUsing domains instead of / in addition to configured path segments is currently not possible out of the box.
Why I consider this un-Neos-yIt would be more awesome if it was.
Proposition: Implementation alternativesCurrently, the implementation resides in the project's site package. It could either go to the Neos core (since the CR does not know what a domain is) or to a separate package. That's actually the main question here, I think. A few facts to provide a better overview:
- It almost completely relies on domains. There are a few configuration options necessary (e.g. the dimension name and the default domain), but it’s much less than for path segement based dimensions
- The host pattern is used as the identifier
- No subdomain support as yet, so there can only be one dimension based on domains (I’m not sure whether subdomain support would make much sense, anyway)
- The implementation uses a custom
ContentDimensionPresetSourceand provides full compatibility with path segment based dimensions (mandator1.tld/en/wat.html can be resolved to mandator: mandator1.tld, language: en)
- Different environments are supported via domain mapping mechanisms. Development and preview servers usually use different domains than the live system does. To make content imported from the live environment work, the domains / dimension values can be mapped either via regex pattern or simple key-value replacement
There are a few issues that I could need help with, though:
- Currently to switch dimension values, you have to re-login at another domain. It seems like the dimension context parameters in the backend URLs are not evaluated when the content context is initialized, are they?
- The backend dimension selector does not work and would have to be adjusted.
- The “preview in target workspace” button does not link to a valid node URL because the dimension values contain dots and the URL is pruned at the wrong one.