Open tyteen4a03 opened 2 weeks ago
I think we could totally support this. We just need to put together a hard-coded list of slugs that could appear in the "/collections/:collectionSlug/:id/:pageSlug" pageSlug
slot.
If we had all of those then we should be able to adjust the code here: https://github.com/payloadcms/payload/blob/beta/packages/next/src/views/Root/getViewFromConfig.ts#L180-L192
Link to reproduction
No response
Environment Info
Node.js v22.7.0
Binaries: Node: 22.7.0 npm: 10.8.2 Yarn: N/A pnpm: 9.12.1 Relevant Packages: payload: 3.0.0-beta.113 Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 Available memory (MB): 32768 Available CPU cores: 10
Describe the Bug
Custom views in v3 no longer support routing views under
/collection/<slug>
, which used to be possible in v2.I'm not sure if this is a bug or if this is intended. Either way, clarification would be good.
Reproduction Steps
Add a custom with a config like this:
(the easiest way to check this is by modifying
customParamViewPath
to/collections/users/:id/view
(https://github.com/payloadcms/payload/blob/a526c7becdf0309cf6069923c8d2ccd1f7a66a9f/test/admin/shared.ts#L11)Adapters and Plugins
No response