Details
-
Improvement
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
-
Empty show more show less
-
Yes
-
DevX 40, DevX 45
-
2
Description
If the site is defined for .e.g prefix /path/to/site, then in the `routeTemplaate` a new property/variable: `{{@sitePath}}` should return only the subpath
ie: `/path/to/site/sub/path` → `/sub/path`
This would make it convenient for the frontend/SPA developer as the URL loaded in the Page Editor would be the same to how it is loaded in the production frontend.
Note:
Keep in mind that even in the non-site context, frontends also need to usually handle two different routes, one for preview, and one for production. Consider the "react-minimal" demo project. For both of these URLs:
- http://mydomain.com
- http://mydomain.com/react-minimal (for preview)
The SPA makes a delivery request to the full path http://delivery/react-minimal
Context
See: https://magnolia-cms.slack.com/archives/C02JTLP0CPP/p1686240443967409
Workaround:
The frontend app / SPA, can have routing logic to handle the the URL with the full path. (There might be situations where this is tricky.)
Checklists
Attachments
Issue Links
- duplicates
-
SAAS-125 Loading...
1.
|
Implementation |
|
Completed | Rishab Dhar | ||||||||
2.
|
Review |
|
Completed | Dai Ha | ||||||||
3.
|
Pre-Integration QA |
|
Completed | Robert Šiška | ||||||||
4.
|
QA |
|
Closed | Oanh Thai Hoang |
|